Clone twist_stamper to the root of this project:
git clone https://github.com/joshnewans/twist_stamper.git
Launch Gazebo
ros2 launch robot_tank_desc gazebo.launch.py
Launch RViz
rviz2 -d src/robot_tank_desc/config/view_robot.rviz
Launch Robot Server
ros2 launch robot_tank_desc robot.launch.py
Launch RViz
rviz2 -d src/robot_tank_desc/config/view_robot.rviz
ros2 launch slam_toolbox online_async_launch.py slam_params_file:=./src/robot_tank_desc/config/mapper_params_online_async.yaml use_sim_time:=true
ros2 launch nav2_bringup navigation_launch.py use_sim_time:=true
Launch RViz
rviz2 -d src/robot_tank_desc/config/robot_with_map.rviz
Install docker
Run ./scripts/server.docker-build.sh to build the image.
Run ./scripts/server.docker-run.sh to run the joystick controller node.
Instructions for getting xbox one controller working over bluetooth. Note disabling ERTM was not required on Ubuntu 22.04: https://www.addictivetips.com/ubuntu-linux-tips/xbox-one-controllers-over-bluetooth-linux/
sudo apt update && sudo apt install libgpiod-dev gpiod python3-libgpiod
You also might need to update some udev rules to allow your user access to gpio. See warthog618/go-gpiocdev#10 (comment)
Edit /boot/firmware/config.txt and add the following lines:
enable_uart=1
dtoverlay=disable-bt
source ./install/setup.bash
ros2 launch rpi rpi.launch.py
Install docker and clone the repo onto a raspberry pi,
Run ./scripts/docker-build.sh to build the image.
Run ./scripts/rpi.docker-run.sh to run the motor controller node.
The raspberry pi pin mappings are:
Left Motor Step: 27 Left Motor DIR: 17 Left Motor EN: 22 Right Motor Step: 6 Right Motor DIR: 6 Right Motor EN: 13
Lidar TX: 15 (RPi UART0 RX) Lidar RX: 14 (RPi UART0 TX)
- Run docker compose file on rpi.
On PC, run:
rviz2 -d src/robot_tank_desc/config/robot_with_map.rviz
ros2 launch slam_toolbox online_async_launch.py slam_params_file:=./src/robot_tank_desc/config/mapper_params_online_async.yaml
ros2 launch robot_tank_desc robot_nav.launch.py
# Default nav2 params
ros2 launch nav2_bringup navigation_launch.py
# OR custom params
ros2 launch robot_tank_desc navigation_launch.py