TBW
Compete in DPRG indoor contests (6-can, 4-square)
Map the house
Wander around open spaces in the house
Teleop using phone
Reset/Restart Autonomy Layer or Motion Control Layer and system resumes operation
Stop Autonomy Layer and robot stops in safe state
Run Autonomy SW in simulation (for system test/dev purposes)
System cannot complete mission, so cancels it. (Examples: cannot escape bumper press, critically low battery)
Analyze logs & bags from runs, with visibility into all important aspects
System shall transport packets between Autonomy Layer and Motion Control Layer with integrity checking
System shall drop packets that fail checks
System design shall be tolerant of dropped packets (Hi-want)
System shall ramp wheel velocity to requested level at an achievable rate. Rationale: steps in motor power may produce perturbations.
System shall log important motion-control layer data to bag files
System shall provide realtime performance for motion control loops
System shall be based on the Linorobot2 stack with Thomas Chou's Linorobot2_hardware ESP32-Waveshare support. (Linorobot2 constraint based on minimizing ROS2 learning curve and getting earliest-possible working robot. Thomas Chou's fork of Linorobot2_hardware is based on him providing a good wiki that organizes bringup and gives a lot of ancilliary information).
Minniebot is an indoor robot based on a small inexpensive differential drive platform with brushed DC yellow TT motors with quadrature encoders. It runs the Linorobot ROS2 SW stack, which gives it SLAM and Nav2 capabilities. These support the use cases of DPRG contests and wandering around the house.
The Linorobot2 stack is an implementation of ROS2 on Raspberry Pi or PC and micro-ros on microcontrollers such as teensy and ESP32. It requires that an implementation have specific models of a spinning lidar and a depth camera (or that the builder provide compatible SW drivers). The lidar and depth camera are mounted on the platform, along with an RPi and the ESP32-based Waveshare General Robot Control board and other sensors.
LD19 lidar
Oak-D-Lite RGB-D camera
Front Bumper
Quadrature encoders
IMU
In Google sheet
RPi USB2 bottom port cabled to Waveshare serial port (left)
RPI USB3 bottom port cabled to Waveshare lidar port (right)
Use imager to install Ubuntu 24.04 LTS on SD card for Minniebot
Boot SD card in RPi to complete installation
From monitor: sudo apt install ssh; sudo systemctl enable ssh; sudo systemctl status ssh. Now you can log into minniebot
Follow instructions at https://github.com/hippo5329/micro_ros_arduino_examples_platformio/wiki#install-the-software-tools to install additional SW on RPi
The build low-latency kernel step failed, unable to find a dtb. I found the missing dtb in /boot/dtbs/raspi-kernel-something and copied it to flash-kernel and the step succeeded.
Test that talker and listener can communicate when running on two ROS computers. Test in both directions. If there are problems, follow the Installation troubleshooting guide - this includes multicast tests. If there are still problems, test the abilty to send UDP packets between laptop & RPi:
computer 1: nc -ul 1234 # listen on UDP port 1234
computer 2: echo hullo | nc -u <other IP> 1234
Related ufw firewall configuration commands
sudo ufw status
sudo ufw status numbered
sudo ufw delete 6
sudo ufw enable
sudo ufw allow in proto udp to 224.0.0.0/4
sudo ufw allow in proto udp from 224.0.0.0/4
sudo ufw allow in proto udp to 192.168.0.0/16
sudo ufw allow in proto udp from 192.168.0.0/16
Use the nomachine client on the laptop. The nomachine service is installed and runs from startup on the RPi and offers discovery to the client when run nomachine is run on the laptop. Be sure to disable the server on the laptop.
In the linorobot2_hardware/firmware directory, run
pio -e gendrv -t upload
alias minniebot='ros2 launch linorobot2_bringup bringup.launch.py base_serial_port:=/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0-port0 lidar_serial_port:=/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.0-port0'
Right motor with red on +ve voltage drives fwd. Left motor with red on +ve drives backward
Motor gear ratio is 120:1. There are 8 encoder pulses per revolution, => 960 pulses per wheel revolution
Wheel diameter: 80mm, circumference: 251.3mm. => 0.261mm travel per encoder pulse
With V-in = 6.5V, wheels rotated 19-20 times in 8 sec => 150RPM. This is close to unloaded spec of 160RPM at 6V
At 150 RPM, motor would travel 0.63m/s
When bottom left USB on RPi is plugged into esp32, it's /dev/serial/by-path ID is platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0-port0
When bottom right USB3 on RPi is plugged into lidar, it's /dev/serial/by-path ID is platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.0-port0
local_costmap:
local_costmap:
ros_parameters:
footprint: "[ [0.05, 0.09], [0.05, -0.09], [-0.09, -0.09], [-0.09, 0.09] ]"
global_costmap:
global_costmap:
ros_parameters:
robot_radius: 0.09