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

Can't receive depth camera pointclouds #526

Open
tkirc opened this issue Nov 21, 2024 · 7 comments
Open

Can't receive depth camera pointclouds #526

tkirc opened this issue Nov 21, 2024 · 7 comments

Comments

@tkirc
Copy link

tkirc commented Nov 21, 2024

I run the newest version of the spot_ros2 driver corresponding to the version 4.1.0

I see all the camera related topics:
/camera/back/camera_info
/camera/back/image
/camera/frontleft/camera_info
/camera/frontleft/image
/camera/frontright/camera_info
/camera/frontright/image
/camera/hand/camera_info
/camera/hand/image
/camera/left/camera_info
/camera/left/image
/camera/right/camera_info
/camera/right/image
/cmd_vel
/depth/back/camera_info
/depth/back/image
/depth/frontleft/camera_info
/depth/frontleft/image
/depth/frontright/camera_info
/depth/frontright/image
/depth/hand/camera_info
/depth/hand/image
/depth/left/camera_info
/depth/left/image
/depth/right/camera_info
/depth/right/image
/depth_registered/frontleft/camera_info
/depth_registered/frontleft/image
/depth_registered/frontright/camera_info
/depth_registered/frontright/image
/depth_registered/left/camera_info
/depth_registered/left/image

But with ros2 topic echo /depth/frontright/image on any camera i only get messages filled with zeros.

header:
stamp:
sec: 1732193652
nanosec: 762096144
frame_id: frontright
height: 240
width: 424
encoding: 16UC1
is_bigendian: 0
step: 848
data:

  • 0

  • 0

  • 0

  • 0

  • 0

  • 0

  • '...'


And in rviz i get the following warning:
Screenshot from 2024-11-20 15-32-31

To start the driver i set the ros parameter publish_point_clouds: True
Has anyone encountered a similar issue.?

@tompe17
Copy link
Collaborator

tompe17 commented Nov 22, 2024

I think you have to publish uncompressed images to get the point cloud. At least we do not get a point cloud if we publish compressed images.

@khughes-bdai
Copy link
Collaborator

@tkirc, what is the full command that you are using to launch the driver?

@tkirc
Copy link
Author

tkirc commented Nov 22, 2024

@khughes-bdai, I run this command with the following .yaml file as an argument:
ros2 launch spot_driver spot_driver.launch.py config_file:=spot_ros.yaml

/**:
  ros__parameters:
    robot_state_rate: 20.0
    metrics_rate: 0.04
    lease_rate: 1.0
    image_rate: 10.0
    auto_claim: False
    auto_power_on: False
    auto_stand: False
    deadzone: 0.05
    estop_timeout: 9.0
    username: "admin"
    password: ""
    hostname: "192.168.50.3"
    start_estop: False
    preferred_odom_frame: "odom"
    async_tasks_rate: 20.0
    cmd_duration: 0.3
    rgb_cameras: True
    initialize_spot_cam: False
    launch_rviz: True
    publish_point_clouds: True

@khughes-bdai
Copy link
Collaborator

Ahh, publish_point_clouds is implemented as a launch argument currently. If you modify your command to be
ros2 launch spot_driver spot_driver.launch.py config_file:=spot_ros.yaml publish_point_clouds:=True
(and you can also take it out of your yaml) this should fix the issue!

@tkirc
Copy link
Author

tkirc commented Nov 22, 2024

@khughes-bdai thank you for your help! I try this asap.

@tkirc
Copy link
Author

tkirc commented Nov 26, 2024

I tried to start the driver with this command:
ros2 launch spot_driver spot_driver.launch.py config_file:=spot_ros.yaml publish_point_clouds:=True
But i still receive messages filled with zeros and the error in rviz on the following topics:
/depth/back/image
/depth/frontleft/image
/depth/frontright/image
/depth/hand/image
/depth/left/image
/depth/right/image
/depth_registered/frontleft/image
/depth_registered/frontright/image
/depth_registered/left/image

@khughes-bdai
Copy link
Collaborator

khughes-bdai commented Nov 26, 2024

Hi @tkirc ,
The point clouds are published on the /depth_registered/back/points topic. The depth image should be visible in rviz, I think you just have the wrong setting. Try adding it as an Image instead of a DepthCloud type. I think this is the same with the topic, probably only the part that is visible in the echo is zeros, but the rest should be filled in (try ros2 topic echo /depth/back/image -f to have the command not truncate the output).

image

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

No branches or pull requests

3 participants