0
$\begingroup$

Rosanswers logo

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/content/navigation-stack-robot-setups. 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?


Originally posted by newcastle on ROS Answers with karma: 1 on 2015-01-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Andromeda with karma: 893 on 2015-01-05

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.