Rosanswers logo

Hello, I am currently trying to use the viso2_ros stereo_node in ROS Hydro. I am using the following launch file:

<!-- Arguments -->
<arg name="camera" default="/stereo" /> <!-- The namespace where images are published -->

<!-- Run the camera -->
    <group ns="stereo" >
        <node pkg="uvc_camera" type="uvc_stereo_node" name="uvc_stereo_node">

<!-- Run the ROS package stereo_image_proc -->
<group ns="$(arg camera)" >
    <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">

<!-- Run the viso2_ros package -->
<node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer" output="screen">
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_rect"/>

And this are the topics published by viso2 as a result:





I am getting a constant Visual Odometer got lost! message, so I would like to subscribe rviz to the odometry and point cloud topics to try an troubleshoot the issue.

I think I should be able to do this by opening an odometry and a point cloud display, but from what I read they subscribe to nav_msgs/Odometry and sensor_msgs/PointCloud respectively. I tried remapping the output of the viso2 so it would publish to nav_msgs and sensor_msgs instead of stereo_odometer, but it didn't work, so now i am trying to get rviz to subscribe to the stereo_odometer instead.

I tried adding the following lines to the launch file but it had no effect (rviz still does not show a thing when I open the above mentioned displays):

<node pkg="rviz" type="rviz" name="rviz">
    <remap from="nav_msgs" to="stereo_odometer"/>
            <remap from="sensor_msgs" to="stereo_odometer"/>

Thank you in advance for any help or ideas about how to do this (or how to properly remap viso2 output topic).

Originally posted by Athria on ROS Answers with karma: 78 on 2015-01-06

Post score: 0


1 Answer 1


Rosanswers logo


you are mixing up topics with message types. For example, /stereo_odometer/point_cloud is the topic where sensor_msgs/PointCloud2 is the message type. There is no need for any remapping to display the odometry or point cloud in rviz. Simply edit the topic name in the rviz display to match the one that is published:

image description

Also note that the stereo odometer publishes sensor_msgs/PointCloud2 (with the 2 at the end), make sure you use the corresponding display in rviz. You should also consider adding a display for TF as it gives nicer real-time feedback than the odometry display.

Originally posted by Stephan with karma: 1924 on 2015-01-06

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Athria on 2015-01-10:
Thank you very much! indeed I had everything mixed up, I'm now able to view it without problem. Thanks for the additional note on the PointCloud2 message as well.

I am just using the static tf publisher to satisfy the node requirements, the information provided by it would still be be more useful?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.