0
$\begingroup$

Rosanswers logo

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 that issue, but I'm not sure. Can anybody help me? Regards


Originally posted by aldo85ita on ROS Answers with karma: 252 on 2012-09-11

Post score: 0


Original comments

Comment by axp'dc on 2020-10-17:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by aldo85ita with karma: 252 on 2012-09-13

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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