start-jsk / rtmros_tutorials

Tutorials for rtmros packages
6 stars 61 forks source link

[hrpsys_ros_bridge_tutorials] Add head camera model to HIRONXJSK euslisp model #590

Closed pazeshun closed 2 years ago

pazeshun commented 3 years ago

Depends on https://github.com/start-jsk/rtmros_hrp2/pull/577 MERGE AFTER https://github.com/start-jsk/rtmros_hrp2/pull/577

For https://github.com/jsk-ros-pkg/jsk_recognition/pull/2549#issuecomment-772349653

Now we can use model of HIRONXJSK head camera in euslisp software like https://gist.github.com/pazeshun/b0efb2d25beb70a1640d9ba70864caa9. Screenshot from 2021-03-11 20-36-50

Other fix

pazeshun commented 3 years ago

Not tested well yet.

MiyabiTane commented 3 years ago

@pazeshun After merging https://github.com/start-jsk/rtmros_hrp2/pull/577, I merged pazeshun:add-hironxjsk-camera-model, and I tried to run the file 3d-to-2d-hironxjsk.l, but I got an error back. Here are the details of the error.

$ roseus 3d-to-2d-hironxjsk.l 
configuring by "/opt/ros/kinetic/share/euslisp/jskeus/eus//lib/eusrt.l"
;; readmacro ;; object ;; packsym ;; common ;; constants ;; stream ;; string ;; loader ;; pprint ;; process ;; hashtab ;; array ;; mathtran ;; eusdebug ;; eusforeign ;; extnum ;; coordinates ;; tty ;; history ;; toplevel ;; trans ;; comp ;; builtins ;; par ;; intersection ;; geoclasses ;; geopack ;; geobody ;; primt ;; compose ;; polygon ;; viewing ;; viewport ;; viewsurface ;; hid ;; shadow ;; bodyrel ;; dda ;; helpsub ;; eushelp ;; xforeign ;; Xdecl ;; Xgraphics ;; Xcolor ;; Xeus ;; Xevent ;; Xpanel ;; Xitem ;; Xtext ;; Xmenu ;; Xscroll ;; Xcanvas ;; Xtop ;; Xapplwin 
connected to Xserver DISPLAY=:1
X events are being asynchronously monitored.
;; pixword ;; RGBHLS ;; convolve ;; piximage ;; pbmfile ;; image_correlation ;; oglforeign ;; gldecl ;; glconst ;; glforeign ;; gluconst ;; gluforeign ;; glxconst ;; glxforeign ;; eglforeign ;; eglfunc ;; glutil ;; gltexture ;; glprim ;; gleus ;; glview ;; toiv-undefined ;; fstringdouble irtmath irtutil irtc irtgeoc irtgraph ___time ___pgsql irtgeo euspqp pqp irtscene irtmodel irtdyna irtrobot irtsensor irtbvh irtcollada irtstl irtwrl irtpointcloud eusbullet bullet irtcollision irtx eusjpeg euspng png irtimage irtglrgb 
;; extending gcstack 0x60fd300[16374] --> 0x6586730[32748] top=3c74
irtgl irtglc irtviewer 
EusLisp 9.27( 1.2.2) for Linux64 created on ip-172-30-1-171(Tue Aug 11 18:15:04 UTC 2020)
roseus ;; loading roseus("1.7.4") on euslisp((9.27 ip-172-30-1-171 Tue Aug 11 18:15:04 UTC 2020  1.2.2))
eustf roseus_c_util Call Stack (max depth: 20):
  0: at (make-camera-from-ros-camera-info-aux 640 480 #f(574.053 0.0 314.5 0.0 0.0 574.053 235.5 0.0 0.0 0.0 1.0 0.0) head_camera_depth-sensor-coords :name :head_camera/depth)
  1: at (setq head_camera-depth (make-camera-from-ros-camera-info-aux 640 480 #f(574.053 0.0 314.5 0.0 0.0 574.053 235.5 0.0 0.0 0.0 1.0 0.0) head_camera_depth-sensor-coords :name :head_camera/depth))
  2: at (send #:inst350 :init)
  3: at (let ((#:inst350 (instantiate hironxjsk-sensor-robot))) (send #:inst350 :init) #:inst350)
  4: at (instance hironxjsk-sensor-robot :init)
  5: at (setq *hironxjsk* (instance hironxjsk-sensor-robot :init))
  6: at (hironxjsk)
  7: at (setq *robot* (hironxjsk))
  8: at (if (not (boundp '*robot*)) (setq *robot* (hironxjsk)))
/opt/ros/kinetic/share/euslisp/jskeus/eus/Linux64/bin/irteusgl: ERROR th=0 unbound variable head_camera_depth-sensor-coordshead_camera_depth-sensor-coords in (make-camera-from-ros-camera-info-aux 640 480 #f(574.053 0.0 314.5 0.0 0.0 574.053 235.5 0.0 0.0 0.0 1.0 0.0) head_camera_depth-sensor-coords :name :head_camera/depth)E: 
k-okada commented 3 years ago

@MiyabiTane can you provide your workspace info?


k-okada@p51s:~/catkin_ws/ws_hrp2/src$ wstool scrape -y

...

k-okada@p51s:~/catkin_ws/ws_hrp2/src$ wstool info
/usr/lib/python2.7/dist-packages/wstool/config_yaml.py:74: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  yamldata = yaml.load(stream)
workspace: /home/k-okada/catkin_ws/ws_hrp2/src

 Localname        S SCM Version (Spec)                                                        UID  (Spec)                 URI  (Spec) [http(s)://...]
 ---------        - --- --------------                                                        -----------                 ---------------------------
 rtmros_tutorials V git add_gazebo_model_pose_publish  (add_nextage_tutorials)                e3520d85df7c (071213972b21) git@github.com:start-jsk/rtmros_tutorials.git    (git@github.com:k-okada/rtmros_tutorials.git)
 rtmros_nextage   V git add-bright-world < pazeshun/add-bright-world  (enable_set_model_file) d4595d903519 (73450f815dad) git@github.com:tork-a/rtmros_nextage.git    (git@github.com:k-okada/rtmros_nextage.git)
 rtmros_hrp2        git <detached>  (-)                                                       da752e93d551                git@github.com:start-jsk/rtmros_hrp2.git
 rtmros_hironx      git indigo-devel                                                          f2de65edcd1f                git@github.com:start-jsk/rtmros_hironx.git
 rtmros_gazebo      git master  (-)                                                           26a9dd2d4ba8                git@github.com:start-jsk/rtmros_gazebo.git
 rtmros_common      git master                                                                481dec748084                git@github.com:start-jsk/rtmros_common.git
 multisense_ros     git <detached>  (-)                                                       d508011c64df                git://github.com/carnegierobotics/multisense_ros.git
 hrpsys-release     git release/melodic/hrpsys                                                f35b46f2424b                git@github.com:tork-a/hrpsys-release.git
 gazebo_ros_pkgs    git add_gazebo_pose_publisher  (-)                                        f01fad79bada                github.com/ros-simulation/gazebo_ros_pkgs``
MiyabiTane commented 3 years ago

@k-okada I cannot use the command wstool scrape -y Here are my workspace info.

tanemoto@hirovision:~/hiro_ws/src$ ls
jsk_3rdparty  jsk_common  jsk_recognition  rtmros_common  rtmros_hironx  rtmros_hrp2  rtmros_tutorials

tanemoto@hirovision:~/hiro_ws/src/rtmros_tutorials$ git branch -vv
  add_by_tanemoto          32dc822 [MiyabiTane/add_by_tanemoto] Merge branch 'add_by_tanemoto' of https://github.com/MiyabiTane/rtmros_tutorials into add_by_tanemoto
  demo_m1                  b171ffa add files
  hironxjsk-model-real-sim af79ece [pazeshun/hironxjsk-model-real-sim: ahead 1, behind 1] [hironx_tutorial] Add speech nodes
  master                   bec253c [origin/master: behind 21] Merge pull request #571 from Naoki-Hiraoka/add-melodic-test
* test_pullreq             736d064 [hrpsys_ros_bridge_tutorials] Add camera model to HIRONXJSK euslisp model

tanemoto@hirovision:~/hiro_ws/src/rtmros_hrp2$ git branch -vv
  master       66317ac [origin/master] Merge pull request #543 from Naoki-Hiraoka/add_queue_size
* test_pullreq da752e9 [hrp2_models/HIRONXJSK] Adjust camera types to real robot

tanemoto@hirovision:~/hiro_ws/src/rtmros_common$ git branch -vv
* master 646c5b7 [origin/master] Merge pull request #1098 from pazeshun/melodic-deb

tanemoto@hirovision:~/hiro_ws/src/rtmros_hironx$ git branch -vv
* indigo-devel f2de65e [origin/indigo-devel] 2.2.0

tanemoto@hirovision:~/hiro_ws/src/jsk_3rdparty$ git branch -vv
  master           bfce3ff [origin/master] Merge pull request #217 from MiyabiTane/master
* support-new-risa 10b5de9 [pazeshun/support-new-risa] [voice_text] Support other speakers than SAYAKA and new directory tree

tanemoto@hirovision:~/hiro_ws/src/jsk_common$ git branch -vv
* master ef39480 [origin/master] 2.2.11

tanemoto@hirovision:~/hiro_ws/src/jsk_recognition$ git branch -vv
* master a6abfcc [origin/master] 1.2.15
k-okada commented 3 years ago

try

cd <catkin_ws>/src
wstool init .
wstool scrape -y
pazeshun commented 3 years ago

@MiyabiTane Sorry, please run

catkin build hrpsy_ros_bridge_tutorials --force-cmake

as https://github.com/start-jsk/rtmros_tutorials/blob/master/hironx_tutorial/doc/index.rst#installation say.

MiyabiTane commented 3 years ago

@pazeshun @k-okada I tried catkin build hrpsy_ros_bridge_tutorials --force-cmake and now, I can run the file 3d-to-2d-hironxjsk.l on hirovision.

Here are my workspace info

tanemoto@hirovision:~/hiro_ws/src$ wstool info
workspace: /home/tanemoto/hiro_ws/src

 Localname        S SCM Version (Spec)                                    UID  (Spec)  URI  (Spec) [http(s)://...]
 ---------        - --- --------------                                    -----------  ---------------------------
 rtmros_tutorials M git test_pullreq  (-)                                 736d0649fea3 github.com/start-jsk/rtmros_tutorials.git
 rtmros_hrp2        git test_pullreq  (-)                                 da752e93d551 github.com/start-jsk/rtmros_hrp2.git
 rtmros_hironx      git indigo-devel  (-)                                 f2de65edcd1f github.com/start-jsk/rtmros_hironx.git
 rtmros_common      git master  (-)                                       646c5b7e31f1 github.com/start-jsk/rtmros_common.git
 jsk_recognition    git master  (-)                                       a6abfcc82be3 github.com/jsk-ros-pkg/jsk_recognition.git
 jsk_common       M git master  (-)                                       ef394804ecd0 github.com/jsk-ros-pkg/jsk_common.git
 jsk_3rdparty       git support-new-risa < pazeshun/support-new-risa  (-) 10b5de9b08d4 github.com/jsk-ros-pkg/jsk_3rdparty.git

Thank you!!

pazeshun commented 2 years ago

This PR is used by @MiyabiTane and @samejima00 for a long time and no issue is reported. @k-okada Could you review this?

pazeshun commented 2 years ago

Thank you!!!!