ROS workspace for turtlebot autonomy. Developed and tested with Python 3 and ROS Noetic/Melodic
- Install ROS.
- Install catkin tools.
- Install python dependencies:
pip3 install --user empy catkin-pkg rospkg
- Install ROS dependencies:
sudo apt-get install ros-"${ROS_DISTRO}"-turtlebot3 ros-"${ROS_DISTRO}"-move-base ros-"${ROS_DISTRO}"-teb-local-planner
- Create a ROS workspace and clone this repo into the
src/folder of your workspace.- If base station, additionally (also in
src/), clone https://github.com/Stanford-NavLab/navlab_turtlebot_base and install dependencies.
- If base station, additionally (also in
- Run
catkin build --cmake-args -DCMAKE_BUILD_TYPE=Releasefrom workspace root.
Gazebo two robot position exchange
roslaunch navlab_turtlebot_bringup navigate_multi.launch
robot_count= 4goal_file=two_swap.yaml
- Start the controllers
rosrun navlab_turtlebot_control twist_sender.py -n turtlebot1rosrun navlab_turtlebot_control twist_sender.py -n turtlebot2
- Start the planners
rosrun navlab_turtlebot_planning dubins_planner.py -n turtlebot1rosrun navlab_turtlebot_planning dubins_planner.py -n turtlebot2
In general:
roslaunch navlab_turtlebot_bringup navigate_multi.launch
args:
robot_count:=nsim:=true/falseplanner:="" or "goal"goal_file:=<filename>.yaml
(Params/goal file location: navlab_turtlebot_base/navlab_turtlebot_sim/params/)
- For now, easiest to edit
navigate_multi.launchto adjust params file
Change ROS planner: navlab_turtlebot/navlab_turtlebot_planning/launch/move_base_multi.launch
- TEB planner or DWA planner
- Also edit planner parameters here
TEB planner obstacles:
- publish to topic:
/turtlebot1/move_base/TebLocalPlannerROS/obstacles
Collaborative localization and planning (with 4 bots):
If you get an error that says:
/usr/bin/env: ‘python’: No such file or directory
Then you may need to add a symlink so ROS can find your Python version. For example
sudo ln -s /usr/bin/python3 /usr/bin/python