Ask Your Question
0

Sending Initial pose to the Navigation Stack?

asked 2018-07-02 21:55:33 -0600

A.M Dynamics gravatar image

Hello,

There is tutorial for Sending Goals to the Navigation Stack in Ros wiki here. Is it possible to do the same thing for the initial position of the robot? if yes, how could I extract the actual pose of the robot first and then use it for this propose?

Thanks for helping me out?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-07-03 02:14:05 -0600

Delb gravatar image

If you are using, like the tutorial, the base_link frame of the robot then the initial pose is always {0;0}.

If you want the initial pose of the robot within the map reference frame then you can use a tf listener between map and base_link before moving the robot and save the coordinates to use them when you need.

edit flag offensive delete link more
1

answered 2018-07-03 02:41:45 -0600

updated 2018-07-03 02:46:27 -0600

The answer is based on what I get from the question.

  1. if you want to change the initial position of the robot on launch. you can add the initial pose in the xml file. You might be using amcl.launch.xml in the amcl.launch. you can add the initial pose of the robot there as

      <arg name="initial_pose_x" default="0.0"/> 
     <arg name="initial_pose_y" default="0.0"/> 
     <arg name="initial_pose_a" default="0.0"/>
     <include file="$(find <package>)/launch/includes/amcl.launch.xml">
     <arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
    <arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
     <arg name="initial_pose_a" value="$(arg initial_pose_a)"/>
    </include>
    

    The above are the parameters for amcl node.

  2. If you want ot track the position of your model in xyz plane, you can use the /odom topic for same. odom will give you the position and orientation of the robot.

I hope, I answered your question

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-07-02 21:55:33 -0600

Seen: 297 times

Last updated: Jul 03 '18