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

[Gazebo9] Added reflectance callback to publish reflectance image in ROS #1046

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Feb 11, 2020

Moved this PR #1044 to noetic-devel to avoid ABI changes in melodic

Refletance must be an image.

To include the reflectance:

<link>
...
  <visual name="visual">
    ...
      <plugin filename="libReflectancePlugin.so" name="reflectance_plugin">
        <reflectance_map>your_reflectance_map.png</reflectance_map>
      </plugin>
      ...
   </visual>
...
</link>

@ahcorde ahcorde requested a review from iche033 February 17, 2020 11:24
@iche033
Copy link
Contributor

iche033 commented Feb 20, 2020

could you update the plugin params in the PR description? i.e. it now expects <reflectance_map> instead of <material>

@ahcorde
Copy link
Contributor Author

ahcorde commented Feb 21, 2020

@iche033, Do you mean this change 63bc8ad?

@iche033
Copy link
Contributor

iche033 commented Feb 21, 2020

I didn't know I can just edit your comment in the PR. I just updated it (the first comment in the conversation)

@iche033
Copy link
Contributor

iche033 commented Feb 24, 2020

Just checking this is also what you get from /depth_cam/reflectance when running gazebo_ros_depth_camera.world?

depth_cam_reflectance

The output is a little darker than the actual terrain.png but I wonder if it's how the data is visualized.

@ahcorde
Copy link
Contributor Author

ahcorde commented Feb 26, 2020

yes, I think it's a visualization matter. I got the same image

@ahcorde
Copy link
Contributor Author

ahcorde commented Feb 28, 2020

friendly ping @chapulina

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I just have a nitpick about documentation. Also note that the upstream PR must be merged first.

Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@chapulina chapulina merged commit 416eaed into ros-simulation:noetic-devel Mar 26, 2020
@apojomovsky
Copy link

Hi guys, and sorry for breaking in into a long merged PR, but I'm not being able to run this example. Particularly, what I'm doing is:

roscore &
rosrun gazebo_ros gazebo ./opt/ros/noetic/share/gazebo_plugins/test/test_worlds/gazebo_ros_depth_camera.world

And on a separate terminal I'm running rqt_image_view, but there doesn't seem to be a <prefix>/reflectance topic being published whatsoever.

Screenshot from 2021-11-10 14-02-54

I'm running ROS noetic with gazebo_ros_pkgs (v 2.9.2-1focal.20211007.215718), all installed from debians via apt.

Any suggestions would be welcome!

cohen39 pushed a commit to cohen39/gazebo_ros_pkgs that referenced this pull request Nov 15, 2021
…ROS (ros-simulation#1046)

* Added reflectance callback to publish reflectance image in ROS

* removed debug trace ros_depth_camera

* update reflectance_plugin tag from material to reflectance_map

* fixed index variable

* Added documentation and override

Signed-off-by: ahcorde <ahcorde@gmail.com>

* updating reflectance_map tags

Signed-off-by: ahcorde <ahcorde@gmail.com>
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

Successfully merging this pull request may close these issues.

4 participants