Code implementation for our robot competing in the EPFL Robotic Competition.
Complete submission video can be found here.
Some code of this repository was inspired from the following repositories:
Software requirements:
- Ubuntu 22.04
- ROS2 Humble
- Gazebo 11
- Python 3.10
- Docker
Hardware requirements:
- Raspberry Pi 5 (or equivalent)
- OPTIONAL - Connect to the zerotier private network (ID:
856127940c82f9a4
):
sudo zerotier-cli join 856127940c82f9a4
- SSH into the onboard computer:
[email protected]
psswd: pi
- Shutdown onboard computer:
sudo poweroff
- Disconnect from the zerotier network (ID:
856127940c82f9a4
):
sudo zerotier-cli leave 856127940c82f9a4
- OPTIONAL - Pull the Docker image from Docker Hub (if not already done):
docker pull jacquemont/robot_os
- Run the Docker container:
sudo docker run --rm --privileged -it --net=host -v /dev/bus/usb:/dev/bus/usb jacquemont/robot_os bash
- Open the robot software startup menu in the docker container:
./robot_start.sh
- OPTIONAL - Open a new terminal in the Docker container:
sudo docker exec -it $(sudo docker ps -aqf "ancestor=jacquemont/robot_os") bash
- Create a new workspace:
mkdir -p ~/colcon_ws/src && cd ~/colcon_ws/src
- Clone the repository with the submodules:
git clone --recursive [email protected]:DJacquemont/BlockBuster.git .
- Build the workspace:
cd ~/colcon_ws
source /opt/ros/humble/setup.bash
colcon build --symlink-install
- Source the workspace:
source ~/colcon_ws/install/setup.bash
To start the robot hardware, execute the file robot_start.sh
once connected to the onboard computer, or run the following command:
ros2 launch blockbuster_core launch_robot.launch.py activate_slam:=false activate_nav:=true activate_loc:=true activate_cam:=true activate_sm:=true
To start the robot simulation, run the following command:
ros2 launch blockbuster_core launch_sim.launch.py activate_slam:=false activate_nav:=true activate_loc:=true activate_cam:=true activate_sm:=false
Start a teleoperation node in a terminal from the colcon_ws
repository:
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __node:=teleop_node -r /cmd_vel:=/cmd_vel_key
Or with the joystick:
ros2 launch blockbuster_core joystick.launch.py
Start Rviz in a new terminal from the colcon_ws
repository with the right configuration:
rviz2
Open from the GUI the configuration file main.rviz
to monitor the robot.