API call for determine new map position

asked 2017-11-06 15:00:17 -0500

MarkyMark2012 gravatar image

updated 2017-11-07 01:33:51 -0500

gvdhoorn gravatar image

Hi,

Other than using standard trig - is there an API call that give the data below say will return the new position to pass to the navigation stack if I command the robot to move 0.5 meters backwards:

position:
  x: 1.95812040039
  y: 1.32759493657
  z: 0.0
orientation:
  x: 0.0
  y: 0.0
  z: 0.702802831861
  w: 0.71138469166

Thanks

Mark

edit retag flag offensive close merge delete

Comments

To answer the second part of your question, if you want to send the robot 0.5 metres backwards, you can send a pose command in the frame of the base_link/base_footprint. Assuming x forward, y left, z up, this command would be pos: -0.5 0 0, rot: 0 0 0 1, header/frame_id: base_link.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-11-06 17:10:03 -0500 )edit

Otherwise, you can use the transform of base_link -> odom/map to get your position.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-11-06 17:11:05 -0500 )edit