ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

mono_odometer of viso2_ros don't generate timestamp information

asked 2012-09-11 07:37:40 -0500

aldo85ita gravatar image

Hi everybody, I use gscam (http://www.ros.org/wiki/gscam) to generate a video stream and mono_odometer application of viso2_ros (http://www.ros.org/wiki/viso2_ros#) to process it and compute visual odometry. Giving a look at the odometry messages I get the following info:

aldo@aldo-ubuntu:~/Projects/4thRC/BergamoComponents/services_caller/bin$ rostopic echo /mono_odometer/odometry
header: 
  seq: 7
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: /odom
child_frame_id: /base_link
pose: 
  pose: 
    position: 
      x: 0.0358117049907
      y: -0.105056291215
      z: 1.05073866966
    orientation: 
      x: 9.03653364967e-05
      y: -0.000380259093953
      z: -0.000498042565549
      w: 0.999999799595
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
header: 
  seq: 8
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: /odom
child_frame_id: /base_link
pose: 
  pose: 
    position: 
      x: 0.0409528148301
      y: -0.116839589994
      z: 1.17038278247
    orientation: 
      x: 0.000299344860283
      y: -0.000918266853756
      z: -0.000664260264014
      w: 0.999999312968
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

As you can see odometry info (position and orientation) are updated properly, but timestamp (secs and nsecs) are never updated. I think rviz can't show me the robot odometry or position for ... (more)

edit retag flag offensive close merge delete

Comments

Hi there. I was wondering if you could explain how you got the odometry data to publish when running. I am trying to get images from a rosbag and i am using a launch file to remap topics. When I run rostopic echo /mono_odometer/odometry, nothing appears.

axp'dc gravatar image axp'dc  ( 2020-10-17 16:33:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-09-13 00:20:41 -0500

aldo85ita gravatar image

I fixed it! Use the patch described at :

http://toychest.in.tum.de/wiki/_media/fastdev:gscam.patch

in particularly, add the following instructions in src/gscam.cpp:

ros::Time now = ros::Time::now();
msg.header.stamp.sec = now.sec; 
msg.header.stamp.nsec = now.nsec;
camera_info.header.frame_id = frame_id;
camera_info.header.stamp.sec = now.sec; 
camera_info.header.stamp.nsec = now.nsec;

Bye

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-11 07:37:40 -0500

Seen: 131 times

Last updated: Sep 13 '12