Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depth image with turtlebot4 #629

Open
IacopoFornai opened this issue Nov 19, 2024 · 16 comments
Open

depth image with turtlebot4 #629

IacopoFornai opened this issue Nov 19, 2024 · 16 comments
Labels
question Further information is requested

Comments

@IacopoFornai
Copy link

i want to use rtabmap odometry with my turtlebot4 and i have only these topics:

/turtlebot4_4/oakd/rgb/preview/camera_info
/turtlebot4_4/oakd/rgb/preview/image_raw
/turtlebot4_4/oakd/rgb/preview/image_raw/compressed
/turtlebot4_4/oakd/rgb/preview/image_raw/compressedDepth
/turtlebot4_4/oakd/rgb/preview/image_raw/theora

connecting the camera to my laptop and running camera.launch.py i can see more topic:

/diagnostics
/image_rect/ffmpeg
/joint_states
/oak/imu/data
/oak/nn/spatial_detections
/oak/rgb/camera_info
/oak/rgb/image_raw
/oak/rgb/image_raw/compressed
/oak/rgb/image_raw/compressedDepth
/oak/rgb/image_raw/ffmpeg
/oak/rgb/image_raw/theora
/oak/rgb/image_rect
/oak/rgb/image_rect/compressed
/oak/rgb/image_rect/compressedDepth
/oak/rgb/image_rect/theora
/oak/stereo/camera_info
/oak/stereo/image_raw
/oak/stereo/image_raw/compressed
/oak/stereo/image_raw/compressedDepth
/oak/stereo/image_raw/ffmpeg
/oak/stereo/image_raw/theora
/parameter_events
/robot_description
/rosout
/tf
/tf_static

but i haven't any NON compressed image for depth image topic. If i understood correctly rtabmap expects as input a NON compressed image for depth topic, how can i solve this issue?

@IacopoFornai IacopoFornai added the question Further information is requested label Nov 19, 2024
@Serafadam
Copy link
Collaborator

Hi, it seems that the camera on turtlebot is using a different config file, you can edit it to match the one on host, although depending on you resource usage you might want to tweak it a little bit. Default camera config file can be found here, you can follow the documentation on what other values are available.

@orangelee89
Copy link

hi. I got same issue here , but my ros2 version is jazzy ,camera is oakd pro w
and I run rgb_stereo_node.launch.py can get all topic ,but run from turtlebot I got same topic as him
/turtlebot4_4/oakd/rgb/preview/camera_info
/turtlebot4_4/oakd/rgb/preview/image_raw
/turtlebot4_4/oakd/rgb/preview/image_raw/compressed
/turtlebot4_4/oakd/rgb/preview/image_raw/compressedDepth
/turtlebot4_4/oakd/rgb/preview/image_raw/theora

@Serafadam
Copy link
Collaborator

Responded here

@IacopoFornai
Copy link
Author

changing parameter "i_pipeline_type", from RGB to RGBD i'm able to see more topics:

/turtlebot4_1/oakd/rgb/preview/camera_info
/turtlebot4_1/oakd/rgb/preview/image_raw
/turtlebot4_1/oakd/rgb/preview/image_raw/compressed
/turtlebot4_1/oakd/rgb/preview/image_raw/compressedDepth
/turtlebot4_1/oakd/rgb/preview/image_raw/theora
/turtlebot4_1/oakd/stereo/camera_info
/turtlebot4_1/oakd/stereo/image_raw
/turtlebot4_1/oakd/stereo/image_raw/compressed
/turtlebot4_1/oakd/stereo/image_raw/compressedDepth
/turtlebot4_1/oakd/stereo/image_raw/theora

is /turtlebot4_1/oakd/stereo/image_raw a ros2 topic for depth image? i'm asking because the encoding is 16UC1 but when i check the parameter:

ros2 param get /turtlebot4_1/oakd .oakd.stereo.image_raw.format
String value is: jpeg

moreover, is there a way to obtain also other type of RGB images (not preview ones), because i need images with dimensions 7201280 but i only have topic /turtlebot4_4/oakd/rgb/preview/image_raw and images are 250250

thank you in advance!

@Serafadam
Copy link
Collaborator

Hi,

is /turtlebot4_1/oakd/stereo/image_raw a ros2 topic for depth image? i'm asking because the encoding is 16UC1 but when i check the parameter:
ros2 param get /turtlebot4_1/oakd .oakd.stereo.image_raw.format
String value is: jpeg

For encoding type you can check the message itself, it has the field for that. I think that value that you got is for compressed message transport

moreover, is there a way to obtain also other type of RGB images (not preview ones), because i need images with dimensions 7201280 but i only have topic /turtlebot4_4/oakd/rgb/preview/image_raw and images are 250250

If you don't see rgb main topic then I guess it is disabled in params, check parameter rgb.i_publish_topic

@IacopoFornai
Copy link
Author

hi, thank you for your help, i managed to launch without usb connection
ros2 launch depthai_examples rgb_stereo_node.launch.py
but when i try to launch
ros2 launch depthai_ros_driver camera.launch.py i have this error:
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'oak' of type 'depthai_ros_driver::Camera' in container '/oak_container': Component constructor threw an exception: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal

i put a screenshot of my launch:
Screenshot from 2024-12-04 09-19-01

@Serafadam
Copy link
Collaborator

Hi, could you run export DEPTHAI_DEBUG=1 before running the camera driver and post logs that are being output?

@IacopoFornai
Copy link
Author

this is what i obtain:
Screenshot from 2024-12-04 11-57-42
Screenshot from 2024-12-04 11-57-56
Screenshot from 2024-12-04 11-57-56

@Serafadam
Copy link
Collaborator

Hi, it seems your device is being registered as USB2.0 device which could cause issues with larger pipeline, please verify that your port if working properly. You can also follow steps mentioned in bug report template so that we verify this isn't something hardware related

@IacopoFornai
Copy link
Author

hi,
i checked the usb connection and you were right, the camera was connected to the wrong usb port, now doing the same procedure i can see
[component_container-2] Usb connection speed: Super - USB 3.0
so now it is connected through USB 3.0 port, but the error still persists:
Screenshot from 2024-12-05 11-51-36

there is also a weird thing happening: now that i'm connected through USB 3.0 i'm able to launch without error:
ubuntu@turtlebot4-1:~$ ros2 launch depthai_examples stereo_inertial_node.launch.py enableRviz:=False
and i see these topics:
Screenshot from 2024-12-05 11-54-35
but if i echo them, for example: ros2 topic echo ros2 topic echo /color/image
i cannot see any data, while connecting through USB 2.0 i was able to see the camera data.

@Serafadam
Copy link
Collaborator

Hi @IacopoFornai do you experience the same errors when connecting the camera to PC?

@IacopoFornai
Copy link
Author

hi @Serafadam no, when i connect my camera to the pc i can launch all the drivers and see the topics.

@Serafadam
Copy link
Collaborator

Hi @IacopoFornai could you check which version of the driver you have? You can check how to do that for example by running

apt show ros-$ROS_DISTRO-depthai ros-$ROS_DISTRO-depthai-ros ros-$ROS_DISTRO-depthai-bridge ros-$ROS_DISTRO-depthai-ros-msgs ros-$ROS_DISTRO-depthai-ros-driver

@IacopoFornai
Copy link
Author

hi @Serafadam here they are:
Screenshot from 2024-12-11 10-50-35
Screenshot from 2024-12-11 10-50-43

@Serafadam
Copy link
Collaborator

Hi @IacopoFornai, I assume you got it working since there is a new separate issue here ?

@IacopoFornai
Copy link
Author

Hi @Serafadam , unfotunately i didn't find i solution for the previous problem, i went on with one solution that was working regardless of some big delays, the other issue i wrote is regarding a further step of my work, and it is on images size, so i separated the issue to separarate also the topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants