This repository contains ROS2 humble launch files for the Neato Botvac robot and remote Workstation. Not compatible with D8, D9 and D10.
Prerequisites:
sudo apt install build-essential
sudo apt install ros-humble-xacro
sudo apt install python3-rosdep2
sudo apt install ros-humble-ament-cmake-python
Be sure and create a workspace and source directory for your ROS2 source builds. ... Check these repos into that workspace / source directory as follows:
cd <ws>/src
git clone https://github.com/cpeavy2/botvac_node.git
git clone https://github.com/cpeavy2/neato_robot.git
git clone https://github.com/kobuki-base/cmd_vel_mux.git
git clone https://github.com/kobuki-base/kobuki_velocity_smoother
git clone https://github.com/stonier/ecl_tools
sudo apt install ros-humble-navigation2
sudo apt install ros-humble-nav2-bringup
cd ~/<ws>
rosdep update
rosdep install --from-paths src --ignore-src -r -y --rosdistro humble
Install colcon: ROS 2 repository! https://colcon.readthedocs.io/en/released/user/installation.html
cd ~/<ws>
colcon build
cd .. # Home directory
echo 'source ~/<ws>/install/setup.bash' >> ~/.bashrc # sources setup.bash for future sessions. Use your own ROS workspace.
source ~/<ws>/install/setup.bash # sources setup.bash for current session
Power Pi with Battery Bank and put into dirt bin on Botvac. Connect Pi to micro USB socket in the dirt bin and make sure the robot is on.
ros2 launch botvac_node botvac_base.launch.py # This launches the Neato Node which calls the Neato Driver.
ros2 launch nav2_bringup bringup_launch.py use_sim_time:=False autostart:=True map:=/home/user/ws/src/navigation2/nav2_bringup/bringup/maps/map.yaml slam:=True
ros2 launch nav2_bringup rviz_launch.py
ros2 run teleop_twist_keyboard teleop_twist_keyboard
ros2 run nav2_map_server map_saver_cli -f ~/<ws>/src/navigation2/nav2_bringup/bringup/maps/map --free 0.196 --ros-args -p save_map_timeout:=5000.0
Note: Save to directory on your workstation. That is use your own ROS2 workspace.
After creating the map and saving it... kill the slam toolbox and rviz2 terminal. Launch the below launch file to load in the map you saved.
ros2 launch nav2_bringup bringup_launch.py use_sim_time:=False autostart:=True map:=/home/user/ws/src/navigation2/nav2_bringup/bringup/maps/map.yaml
Again, load from user and workspace directory on your workstation.
ros2 launch nav2_bringup rviz_launch.py