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

How to have /camera/rgb_camera/parameter_descriptions topic? #2339

Closed
miku54 opened this issue May 5, 2022 · 24 comments
Closed

How to have /camera/rgb_camera/parameter_descriptions topic? #2339

miku54 opened this issue May 5, 2022 · 24 comments
Labels

Comments

@miku54
Copy link

miku54 commented May 5, 2022

I use a D455 camera, which is connected to my device via USB3.0,my system is foxy,and I am using the ROS2-beta branch.
ros2 launch realsense2_camera rs_launch.py

Tried to start like this, there is no /camera/rgb_camera/parameter_descriptions topic
:ros2 run realsense2_camera realsense2_camera_node

@miku54
Copy link
Author

miku54 commented May 5, 2022

When I start the camera with this command:
ros2 launch realsense2_camera rs_launch.py​​ align_depth:=true pointcloud.enable:=true
Still no topic of pointcloud2;
#2295
This thread has a similar situation to mine, but I can't use this workaround to solve my problem

@miku54
Copy link
Author

miku54 commented May 5, 2022

lADPJxuMQwRvJGHNC9DND8A_4032_3024

@MartyG-RealSense
Copy link
Collaborator

Hi @miku54 The parameter_descriptions topic was listed as supported in the previous ROS2 wrapper (up to version 3.2.3) but is not included in the topics list of the ros2_beta (4.x versions) wrapper documentation. Instead it adds a topic called parameter_events

https://github.com/IntelRealSense/realsense-ros/tree/ros2-beta#published-topics

Are you able to achieve a point cloud with the launch instruction below?

ros2 launch realsense2_camera rs_launch.py depth_module.profile:=1280x720x30 pointcloud.enable:=true

@miku54
Copy link
Author

miku54 commented May 6, 2022

Hi, @MartyG-RealSense thanks for your reply!
I used to download the realsense package of ros2 using binary instructions, and now I use ros2_beta to start the camera;
ros2 launch realsense2_camera rs_launch.py depth_module.profile:=1280x720x30 pointcloud.enable:=true
It is not possible to implement point clouds, but I found that there is a launch (https://github.com/IntelRealSense/realsense-ros/blob/development/realsense2_camera/launch/demo_pointcloud.launch) file in the ROS2 branch that can open point clouds and get topics data, but it only runs for a few seconds after opening the file, and then the image freezes (it looks more like the node died) but the terminal doesn't report any errors, which is too weird

@miku54
Copy link
Author

miku54 commented May 6, 2022

lADPJwY7SzicyKjNC9DND8A_4032_3024

@MartyG-RealSense
Copy link
Collaborator

It looks as though your demo_pointcloud link goes to the ROS1 version of the launch file. The ros2 branch's version is here:

https://github.com/IntelRealSense/realsense-ros/blob/ros2/realsense2_camera/launch/demo_pointcloud_launch.py

@miku54
Copy link
Author

miku54 commented May 7, 2022

Sorry for the wrong link, I am running the official launch file.https://github.com/IntelRealSense/realsense-ros/blob/ros2/realsense2_camera/launch/demo_pointcloud_launch.py

@MartyG-RealSense
Copy link
Collaborator

A couple of users of the ros2_beta wrapper recently found that using a launch file did not work correctly for them but ros2 run did. For example to enable the pointcloud filter by that method:

ros2 run realsense2_camera realsense2_camera_node --ros-args -p pointcloud.enable:=true

@miku54
Copy link
Author

miku54 commented May 7, 2022

Thanks, this instruction can implement point cloud. I tried to use depth_image_proc to complete the conversion, but the effect is not very good, can realsense2_camera_node produce XYZRGB point cloud? like this:
image

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 7, 2022

In the ROS1 wrapper you could get an organized point cloud with depth_image_proc by using the 'rs_rgbd.launch'. In ros2_beta you can generate an organized point cloud with the parameter pointcloud.ordered_pc. By default the pointcloud is unorganized.

I would therefore speculate that the ros2 run instruction would look like the one below.

ros2 run realsense2_camera realsense2_camera_node --ros-args -p pointcloud.enable:=true -p pointcloud.ordered_pc:=true

Does that launch instruction provide you with access to depth_image_proc please?

@MartyG-RealSense
Copy link
Collaborator

Hi @miku54 Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

@manhha1402
Copy link

Hi @MartyG-RealSense,
I launch the d405 camera with the command: ros2 launch realsense2_camera rs_launch.py pointcloud.enable:=true pointcloud.ordered_pc:=true, but the still get unorganized pointcloud
Screenshot from 2022-08-08 11-04-36

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 8, 2022

Hi @manhha1402 I wonder whether this may be because the D405 camera model does not have a separate RGB sensor like the other 400 Series models (D415, D435 / D435i, D455) but instead obtains RGB from its depth sensor.

Is the cloud still unordered if you add align_depth.enable:=true to your launch instruction, please?

@manhha1402
Copy link

manhha1402 commented Aug 8, 2022

Hi @MartyG-RealSense, the result is still the same. I had a look on the code https://github.com/IntelRealSense/realsense-ros/blob/ros2-beta/realsense2_camera/src/base_realsense_node.cpp.There is no keyword ordered_pc. I think ordered_pc isn’t integrated into ros-beta branch.

@MartyG-RealSense
Copy link
Collaborator

I will refer the issue to my Intel RealSense colleagues on the ROS wrapper development team.

@Nir-Az Nir-Az reopened this Aug 15, 2022
@Nir-Az
Copy link
Collaborator

Nir-Az commented Aug 15, 2022

Hi @manhha1402 ,
We will investigate the issue mentioned.

Regarding ordered_pc integration to ros2-beta branch, it did integrate but it was refactored into a named_filter.
Take a look here:

PointcloudFilter::PointcloudFilter(std::shared_ptr<rs2::filter> filter, rclcpp::Node& node, std::shared_ptr<Parameters> parameters, rclcpp::Logger logger, bool is_enabled):

We will update this GH issue with our outcomes,

Thanks for reporting :)

@MartyG-RealSense
Copy link
Collaborator

Hi @manhha1402 As the issue that you reported will be investigated by my Intel RealSense colleagues, I have added an Enhancement label to this case to signify that it should be kept open for the duration of the investigation. Thanks again for your report!

@SamerKhshiboun
Copy link
Collaborator

Hi @manhha1402,

As I saw, there is something wrong in the calculation of ordered point cloud, and it looks it is not related to the camera model.
I'm investigating the issue and will update you asap.

Thanks,
Samer

@SamerKhshiboun
Copy link
Collaborator

SamerKhshiboun commented Sep 21, 2022

Hi @manhha1402, @MartyG-RealSense

The problem was due a bug in the launch file
ordered_pc parameter should be replaced with pointcloud.ordered_pc
This is why all launch commands did not change the status of this param, which stayed false.
I tested the new parameter after the change, and it works good.

image

PR Opened #2487

@manhha1402
Copy link

Hi @SamerKhshiboun
Thank you for fixing the bug!

@MartyG-RealSense
Copy link
Collaborator

Yes, thanks so much, @SamerKhshiboun 👍

@MartyG-RealSense
Copy link
Collaborator

Hi @miku54 and @manhha1402 Do you require further assistance with this case now that a fix has been implemented, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to fix implemented and no further comments received.

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

No branches or pull requests

5 participants