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

Camera info #15

Merged
merged 2 commits into from
Jun 3, 2019
Merged

Camera info #15

merged 2 commits into from
Jun 3, 2019

Conversation

chapulina
Copy link
Contributor

Bridge camera info messages.

camera_info

I'll update this PR with more instructions on how to test it soon. I need to fix a wrong rotation coming from ign-sensors.

@chapulina
Copy link
Contributor Author

Usage example described here.

I tried also converting depth camera images but it's not going through correctly 😢

ignition::msgs::PixelFormatType::R_FLOAT32);
num_channels = 1;
octets_per_channel = 4u;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, RViz shows a black image and RQt seems to show pixels that are closer as darker, but infinity is black:

depth_img

As reference, on Gazebo 9, RQt and RViz also show the inverse of Gazebo. Note though that the pixel format used on SDF is R8G8B8, like on the kinect, instead of R_FLOAT32, like on ign-gazebo's demos.

ros1_depth

Copy link
Contributor Author

@chapulina chapulina May 29, 2019

Choose a reason for hiding this comment

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

infinity is black

gazebo_ros_pkgs is publishing NaN for values out of bounds, but I don't see NaNs when echoing the topic.

ign-sensors is publishing +-inf as defined by REP 117. But when I echo the bridged ROS topic I don't see any infs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I change ign-sensors to publish NaNs instead of +-inf, RViz shows the image. So I think RViz is not handling the infs properly. I'll ticket an issue there.

depth_nan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I change ign-sensors to publish NaNs instead of +-inf, RViz showed the image. So the problem was that RViz was not handling the infs properly. I opened a PR fixing RViz: ros-visualization/rviz#1378

@chapulina chapulina merged commit a1b1903 into master Jun 3, 2019
@scpeters scpeters deleted the camera_info branch June 17, 2019 23:20
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.

2 participants