hsr-project / hsr_ros2_doc

6 stars 1 forks source link

Where are calibration files for hand_camera and head_center_camera driver? #7

Closed y-masutani closed 7 months ago

y-masutani commented 7 months ago

The ros2_control_node problem may be solved, but the problem of hsrb.launch.py still remains. usb_cam_node_exe for hand_camera and head_center_camera died.

Here is the relevant part of the launch message.

[usb_cam_node_exe-12] [INFO] [1707468985.015891484] [hand_camera.driver]: camera_name value: hand_camera
[usb_cam_node_exe-12] [WARN] [1707468985.016022016] [hand_camera.driver]: framerate: 30.000000
[usb_cam_node_exe-12] [INFO] [1707468985.018087916] [hand_camera.driver]: using default calibration URL
[usb_cam_node_exe-12] [INFO] [1707468985.018138100] [hand_camera.driver]: camera calibration URL: file:///home/masutani/.ros/camera_info/hand_camera.yaml
[usb_cam_node_exe-12] [ERROR] [1707468985.018219337] [camera_calibration_parsers]: Unable to open camera calibration file [/home/masutani/.ros/camera_info/hand_camera.yaml]
[usb_cam_node_exe-12] [WARN] [1707468985.018238377] [hand_camera.driver]: Camera calibration file /home/masutani/.ros/camera_info/hand_camera.yaml not found
[usb_cam_node_exe-12] [INFO] [1707468985.020583571] [hand_camera.driver]: Starting 'hand_camera' (/dev/hand_camera) at 640x480 via mmap (yuyv) at 30 FPS
[usb_cam_node_exe-12] terminate called after throwing an instance of 'char*'
[ERROR] [usb_cam_node_exe-12]: process has died [pid 10249, exit code -6, cmd '/opt/ros/foxy/lib/usb_cam/usb_cam_node_exe --ros-args -r __node:=driver -r __ns:=/hand_camera --params-file /home/masutani/hsr_ros2_ws/install/hsrb_bringup/share/hsrb_bringup/config/hand_camera.yaml'].
[usb_cam_node_exe-11] [INFO] [1707468985.045078361] [head_center_camera.driver]: camera_name value: head_center_camera
[usb_cam_node_exe-11] [WARN] [1707468985.045209959] [head_center_camera.driver]: framerate: 30.000000
[usb_cam_node_exe-11] [INFO] [1707468985.049506841] [head_center_camera.driver]: using default calibration URL
[usb_cam_node_exe-11] [INFO] [1707468985.049567971] [head_center_camera.driver]: camera calibration URL: file:///home/masutani/.ros/camera_info/head_center_camera.yaml
[usb_cam_node_exe-11] [ERROR] [1707468985.049653910] [camera_calibration_parsers]: Unable to open camera calibration file [/home/masutani/.ros/camera_info/head_center_camera.yaml]
[usb_cam_node_exe-11] [WARN] [1707468985.049673671] [head_center_camera.driver]: Camera calibration file /home/masutani/.ros/camera_info/head_center_camera.yaml not found
[usb_cam_node_exe-11] [INFO] [1707468985.049705863] [head_center_camera.driver]: Starting 'head_center_camera' (/dev/head_center_camera) at 640x480 via mmap (yuyv) at 30 FPS
[usb_cam_node_exe-11] terminate called after throwing an instance of 'char*'
[ERROR] [usb_cam_node_exe-11]: process has died [pid 10236, exit code -6, cmd '/opt/ros/foxy/lib/usb_cam/usb_cam_node_exe --ros-args -r __node:=driver -r __ns:=/head_center_camera --params-file /home/masutani/hsr_ros2_ws/install/hsrb_bringup/share/hsrb_bringup/config/head_center_camera.yaml'].

There is no calibration data in hsrb_bringup/config/hand_camera.yaml and hsrb_bringup/config/head_center_camera.yaml.

Where are the calibration files for these cameras?

k-takeshita commented 7 months ago

The USB camera should start even without a calibration file. Looking at the ros2_control issue, it seems like a lack of permissions might be the cause. Does your user have permissions for /dev/hand_camera?

y-masutani commented 7 months ago

As noted in #6, the camera nodes are no longer dead and now publish Image topics.

I ask again, how do I prepare the camera calibration data for the ROS 2 system for HSR, can I use the one from ROS 1? It does not seem to be included in /etc/opt/tmc/robot/conf.d/calib_results.

k-takeshita commented 7 months ago

We have not prepared calibration data/procedures for the hand_camera and head_center_camera in either the ROS1 or ROS2 environments. If needed, I believe you can perform the calibration using packages such as camera_calibration.

y-masutani commented 7 months ago

Thank you for your explanation. I understand.