Ask Your Question

Revision history [back]

This is the method to automatically position the robot on the map. (Alternative of 2D pose button)

Open RViz. Using pose estimate position the robot to the required pose.

rostopic echo /amcl_pose

note x and y of posotion

pose: pose: position: x: 0.2692 y: 0.0218 z: 0.0

give x as initial x pose give y as initial y pose

<include file="$(find v1robot_description)/launch/amcl.launch" &gt;="" <arg="" name="initial_pose_x" value="0.2692"/> <arg name="initial_pose_y" value="0.0218"/> </include>

add these values as the arguments initial_pose_x, initial_pose_y In my case orientation was not needed(so I have not tried changing orientation)

So from the next time when we load gazebo+amcl, the mobile robot automatically positions itself on the map. So no need to manually set the home pose using 2D pose estimate button once initial pose arguments are set.