Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
7. Autonomous Navigation
7.1 Define robot size
Navigation stack needs to be aware of the robot size when it plans the path. This is to make sure that the robot has enough clearance and not collide to any obstacle as it follows the planned path.
roscd linorobot/param/navigation nano costmap_common_params.yaml
and define the robot's footprint:
footprint: [[-x, -y], [-x, y], [x, y], [x, -y]]
where x = ROBOT_LENGTH / 2 and y = ROBOT_WIDTH / 2
7.2 Launch AMCL app
On the robot’s computer, open 2 new terminals. Run bringup.launch:
roslaunch linorobot bringup.launch
roslaunch linorobot navigate.launch
On your development computer, run rviz:
roscd lino_visualize/rviz rviz -d navigate.rviz
7.3 Set initial pose
- To localize the robot, click "2D Post Estimate".
- Pinpoint on the map the approximate location of the robot and drag towards the robot's heading.
7.4 Sending goals
- After localizing, click "2D Nav Goal".
- Pinpoint your desired location on the map and drag towards the direction you want your robot to be heading at once it has reached its goal.
You can watch the video here: https://www.youtube.com/watch?v=aqzMq-jMd-c&feature=youtu.be