Ask Your Question

Suscribing rviz to viso2's /stereo_odometer topics

asked 2015-01-06 01:46:17 -0600

Athria gravatar image

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).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-06 11:45:41 -0600

Stephan gravatar image

updated 2015-01-06 11:47:06 -0600


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.

edit flag offensive delete link more


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?

Athria gravatar image Athria  ( 2015-01-10 00:42:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-01-06 01:46:17 -0600

Seen: 558 times

Last updated: Jan 06 '15