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

Robot global position

asked 2015-01-04 16:08:19 -0500

newcastle gravatar image

I want to get the global position of the robot by using rostopic echo /odom/pose/pose after reading through this page https://www.packtpub.com/books/conten... . However, I got the following error "WARNING topic [/odom/pose/pose/] does not appear to be published yet"

How exactly can I get the global position of the robot at any time I want?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-01-05 06:10:56 -0500

Andromeda gravatar image

updated 2015-01-05 15:34:22 -0500

You get that error because you must at first launch:

$ roscore

and the position can you read simply doing:

$ rostopic echo /odom

Here a possible output:

---
header: 
  seq: 101095
  stamp: 
    secs: 1420486637
    nsecs: 175732357
  frame_id: odom
child_frame_id: base_link
pose: 
  pose: 
    position: 
      x: 2.50089152616
      y: 0.00038276584683
      z: 4.0
    orientation: 
      x: -3.63592739957e-17
      y: -5.36734448439e-17
      z: 0.5609555557
      w: 0.82784591835
  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: 1.87866186506e-14
      y: 2.40085554426e-18
      z: 1.84354214137e-14
    angular: 
      x: -1.27595314162e-19
      y: -1.81827239624e-19
      z: -7.25606212625e-14
  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]

Anyway I don't think you have clear how to use the frameworks ROS (it is normal at the beginning), so I suggest you again to read a book on how to setup your robot from scratch.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-01-04 16:08:19 -0500

Seen: 402 times

Last updated: Jan 05 '15