Skip to content

CharlesChang012/2D-ROS-Wheelbot-Navigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D ROS Wheelbot Navigation

This is a self-learning project of SLAM using simulated robot in ROS and Gazebo environment.
It mainly focuses on building and implementing differnt path planning methods from scratch.
Built planning algorithm:

  • A* A*

Learning process

1. Install ros packages

$ sudo apt-get install ros-noetic-joy ros-noetic-teleop-twist-joy ros-noetic-teleop-twist-keyboard ros-noetic-amcl ros-noetic-map-server ros-noetic-move-base ros-noetic-urdf ros-noetic-xacro ros-noetic-rqt-image-view ros-noetic-slam-gmapping ros-noetic-dwa-local-planner ros-noetic-joint-state-publisher-gui

2. Build customized robot using Autodesk Fusion

In this learning repository, I biult a two-wheel robot car with a lidar sensor.
After building the model, export it as urdf file using this github repository.

$ roslaunch wheelbot_description gazebo.launch

To control the robot with keyboard

$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py

3. Add sensor plugins to Gazebo

All plugins can be found here.
Add plugins in wheelbot.gazebo

  • Differential drive controller
  • Laser sensor (non-gpu version)
    Edit gazebo.launch
<arg name="paused" value="false"/>

4. Build customized world using Autodesk Fusion

Save the world as Indoor_world.world in wheelbot_description/worlds/
Edit gazebo.launch

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
<arg name="world_file" value="$(find wheelBot_description)/worlds/Indoor_world.world"/>

5. Make a map of the world using Gmapping

$ roslaunch wheelBot_description gazebo.launch
$ rosrun gmapping slam_gmapping scan:=/rrbot/laser/scan (Used for mapping)
$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py (Control robot movement through keyboard)
$ rosrun map_server map_saver -f Indoor_world_map 	    (Save map)

6. Prepare for navigation

Open a new package called navigation and prepare files inside.
In common_costmap.yaml, set robot footprint:

footprint: [[-0.1, -0.135], [-0.1, 0.135], [0.1, 0.135], [0.1, -0.135]];

More information here:
ros navigation
ros navigation notebook odom frame explanation 1
odom frame explanation 2
costmap_2D
occupancy grid

7. Construct customized global planner

I add my global planner as a plugin following this ros tutorial.
Set different planning methods in movebase.launch

<param name="base_global_planner"  value="astar_planner/AstarPlanner"/>

Other information regarding global_planner can be found here.

8. Start navigation

$ roslaunch wheelBot_description gazebo.launch
$ roslaunch navigation navigation.launch

About

SLAM with custom robot in Gazebo using ROS Nav stack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published