Simulation: https://www.youtube.com/watch?v=KVZ-aN0yCDk
Live Run: https://www.youtube.com/watch?v=i21RZtkrJXI
The onboard Raspberry Pi will execute all packages related to sensor processing, SLAM, and navigation. A separate computer is required to visualize the operation of the robot via Rviz2 and send commands (graphically) to save map and navigate to waypoints. As a future work, the execution of these commands can be written and further customized using API calls (see slam_toolbox and Nav2 documentation) and offloaded to the Raspberry Pi.
- Install Ubuntu 22.04 (Jammy Jellyfish) on computer
- Install ROS 2 Humble on computer
- Power on the Create 3
- Connect the Raspberry Pi to a monitor/keyboard/mouse
- *Install Ubuntu and ROS 2 on the Pi (No need to do this because the robot will be delivered with these pre-installed; Only do this if reinstalling from scratch)
- Setup a Wifi connection on the Pi
- Setup git and clone this repository onto the Pi via
git clone [email protected]:splouisliu/bloomba.git
- Find the local IP address of the Pi and SSH into it from the computer
- Setup the Create 3 and ensure that it's connected to the same Wifi network as the Pi (Can only connect to 2.4GHz Wi-Fi networks).
You should now have access to two ROS environments via the terminals of the computer: the computer itself, and the Pi (SSH'd in)
Refer to the below ROS2 commands for this section:
- On both the computer and the Pi, execute all Basic commands
- On the Pi, execute SLAM bringup (live robot)
- On the computer, execute rviz2
ros2 launch bloomba_bringup rviz_launch.py
- Open another terminal and execute teleop. Use this to drive the robot around the office to build a map
- Once the map is complete, find the slam_toolbox plugin in Rviz2 to save the map. The map will be saved as two files located in the workspace directory of the Pi:
EXAMPLE.pgm
andEXAMPLE.yaml
. - SLAM is now complete. Close the terminal running the code.
- To navigate, execute Navigation bringup (live robot) using the following command:
ros2 launch bloomba_bringup live_nav_launch.py map:=EXAMPLE.yaml
- Using the Nav2 plugin, first estimate the pose of the robot's initial location. A set of green dots should appear. If they don't relaunch the code.
- Next, set waypoints via drag-and-drop for the robot to navigate towards!
Make sure Arduino is connected to Raspberry Pi and powered from the Create 3 adapter board. On the Raspberry Pi, switch to branch “andrew” on the github repo.
-
cd bloomba/bloomba_ws/
-
git checkout andrew
-
colcon build –packages-select plant_docking
-
On the Raspberry Pi, run
ros2 run plant_docking watering_arm
. -
Switching back to the computer, a separate terminal run
ros2 topic pub /keyboard std_msgs/String "data: 'l0.1'" --once
. This will lower the arm by 10 cm and then water the plant. The arm will then move back up by 10 cm. -
If you want to lower by 20 cm, change “l0.1” to “l0.2”. For 30 cm, change it to “l0.3”.
Enter workspace:
cd <INSERT PATH>/bloomba/bloomba_ws
Build (on PC):
rosdep install --from-path src -yi
colcon build --symlink-install
Build (on live robot):
rosdep install --from-path src/bloomba_bringup src/bloomba_navigation src/bloomba_slam -yi
colcon build --symlink-install --packages-select bloomba_bringup bloomba_navigation bloomba_slam
Source:
source install/local_setup.bash
Run SLAM bringup (on PC):
ros2 launch bloomba_bringup sim_slam_launch.py
Run navigation bringup (on PC):
ros2 launch bloomba_bringup sim_nav_launch.py
Run SLAM bringup (on live robot):
ros2 launch bloomba_bringup live_slam_launch.py
Run navigation bringup (on live robot):
ros2 launch bloomba_bringup live_nav_launch.py
Run sim (on PC):
ros2 launch irobot_create_gazebo_bringup create3_gazebo_office.launch.py use_rviz:=false spawn_dock:=false
Run lidar (on live robot):
ros2 launch bloomba_bringup sensors_launch.py
Run laser filters:
ros2 launch bloomba_bringup laser_filters_launch.py
Run teleop:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
Run slam:
ros2 launch bloomba_slam online_async_launch.launch.py
Run rviz:
ros2 launch bloomba_bringup rviz_launch.py
Run navigation:
ros2 launch bloomba_navigation bringup_launch.py map:="maps/map_office_sim.yaml"
Run rosbridge:
ros2 launch rosbridge_server rosbridge_websocket_launch.xml
Visualize TF:
ros2 run tf2_tools view_frames