Skip to content

This is a ROS repository describing how to use the Neato Botvac and Raspberry Pi for mapping and navigating.

Notifications You must be signed in to change notification settings

NMartin354/botvac_node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(Neato) Botvac launch files

This repository contains ROS2 humble launch files for the Neato Botvac robot and remote Workstation. Not compatible with D8, D9 and D10.

Assumes Ubuntu 22.04 and ROS2 Humble have been successfully installed on both Workstation and Pi

Install on Raspberry Pi4 and Ubuntu PC Workstation.

Prerequisites:

sudo apt install build-essential
sudo apt install ros-humble-xacro
sudo apt install python3-rosdep2

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

Install on Ubuntu PC workstation (not necessary to have on Pi).

sudo apt install ros-humble-navigation2
sudo apt install ros-humble-nav2-bringup

On both Workstation and Pi

cd ~/<ws>
rosdep update
rosdep install --from-paths src --ignore-src -r -y

Install colcon: ROS 2 repository! https://colcon.readthedocs.io/en/released/user/installation.html

On both Workstation and Pi

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.

ssh to Pi4 and launch

ros2 launch botvac_node botvac_base.launch.py          # This launches the Neato Node which calls the Neato Driver.

Launch Slam Toolbox on PC Workstation.

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

Run RViz2 on PC Workstation.

ros2 launch nav2_bringup rviz_launch.py 

Run Teleop on PC

ros2 run teleop_twist_keyboard teleop_twist_keyboard

To create map drive robot around using the teleop keyboard node.

After finishing the map use this command to save map on PC

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.

Relaunch rviz2

ros2 launch nav2_bringup rviz_launch.py

On rviz2 set the robot's pose (2D Pose Estimate). Select a target goal (Navigation2 Goal) on the map and the robot will autonomously navigate to that goal.

About

This is a ROS repository describing how to use the Neato Botvac and Raspberry Pi for mapping and navigating.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.4%
  • CMake 6.6%