[Solved] How to get the astra camera working on ROS2

I have a orbbec astra camera on my rosbot and I am trying to see the image/video captured by camera but is not working.

Hi Jaswanth,

Please run lsusb in terminal and share output with us.

Best regards,
Hubert

husarion@husarion:~$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 007: ID 03f0:0c4a Hewlett-Packard
Bus 001 Device 006: ID 03f0:034a Hewlett-Packard Elite Keyboard
Bus 001 Device 005: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 003: ID 2bc5:0401
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0bda:481a Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I have this as part of output for lsusb.command.

Bus 001 Device 003: ID 2bc5:0401 .

The execution is as follows

sudo MicroXRCEAgent serial --dev /dev/ttyS1 -b 500000

ros2 run dds_bridge dds_bridge

ros2 run astra_camera astra_camera_node

I could see new topics after executing the above command,

ros2 run image_tools showimage image:=/image

Executing the above command is resulting in a faint black window.

@Hubert_Zwiercan Any suggestion/ideas ?

Hi Jaswanth_Bandlamudi

It seems to be some kind of issue related with ROS2 pkgs.

Image from Astra camera are visible in Rviz2 after checking box “unreliable”. Please check if it’s possible in your case. We will be investigating this issue.

Best regards,
Hubert

Hi Hubert @Hubert_Zwiercan

Yes, I can see the images when using rviz2 with unreliable ticked.

Best regards,
Jaswanth Bandlamudi.

Hello Hubert @Hubert_Zwiercan

  Any updates on the issue, I think there is a problem with timestamps / Reliability of the messages received from astra_camera node.

Best regards,
Jaswanth bandlamudi.

Hi Jaswanth_Bandlamudi

Unfortunately we didn’t do any progress because of many other projects. I wrote to Orbbec with question about official ROS2 support, but we’re still waiting for answer. You will be informed as soon we receive one.

Best regards,
Hubert

1 Like

Hi @Hubert_Zwiercan,

Any updates on how to run astra_camera on ros2 foxy?

Hi frp,

You just have to use command:

ros2 run astra_camera astra_camera_node

Best regards,
Hubert

Hi,

I get an error after running the command
[INFO] [1622698683.509907584] : Starting color stream.
[ERROR] [1622698683.870348483] : Cannot stream RGB and IR at the same time. Streaming RGB only.
[INFO] [1622698683.873773826] : Starting depth stream.

Also if i run ros2 run image_tools showimage image:=/image
i am unable to see the video stream although i see /image under ros2 topics echo
May I know how to resolve this issue?

Hi @frp,

This error don’t have any impact on camera proper working.

In ROS2 you have to remember about QoS!!! Link for article here

If you want to show image in Rviz you have to set proper fixed frame in global option to openni_color_optical_frame and QoS (in this case best_effort)

In case you want to use image_tools you also have to set QoS. Please use command:
ros2 run image_tools showimage --ros-args -p reliability:=best_effort

I hope my suggestions will help.

Best regards,
Hubert

Hi Hubert, Thank you so much. It worked!

1 Like