- The book Robotics at Home w/ Pico by Danny Staples demonstrates (in CircuitPython) some useful ideas that can be introduced to my PicoBot
- Using BLE UART Friend modules to facilitate teleop controls and laptop data collection & display
- Using the Bosche BNO055 IMU connected via I2C
- instead of the BNO08x module in RVC mode (on uart)
- which needed to be running at 10x loop speed in order to be responsive
- instead of the BNO08x module in RVC mode (on uart)
- I ended up learning how to connect multiple VCSEL distance sensors using an I2C multiplexer board.
- Can have 3 of them giving left/right/fwd dist measurements
- This book also introduced me to the possibility of using Monte Carlo Localization (MCL) and pointed me to some related resources
- Video lectures by Cyrill Stachniss (which are based on the book Probabilistic Robotics)
- My latest thinking is to send pose and distance sensor data to the laptop and have a program on the laptop do the processing (Localization, Mapping, etc)
- At some point, I may explore using the RPLidar A1 to collect and send 360-degree distance data.
- Tele-operate the PicoBot using a joystick type control that senses tipping/tilting of a cell phone
- This works by sending the phone's accelerometer data to the robot using BLE
- An additional Bluefruit LE UART Friend device allows the robot to send map and pose data to my laptop.
- For this, I need to free up a 2nd uart channel
- One uart channel is for sending tele-op driving commands from my phone
- The second is for sending pose data and the arena map to a program on my laptop which plots the data.
- For this, I need to free up a 2nd uart channel
- Up until now, the Picobot has used a bno08x IMU (in RVC mode) on uart1
- In order to free up this uart, I will instead use a bno055 IMU connected on one of the I2C buses
- This video tutorial shows how to do this.
- I end up with one VCSEL distance sensor on i2c0 and the other sharing the i2c1 bus with the IMU.
-
laptop folder contains files that are run on the laptop
-
robot folder contains files that are run on the Pico
-
to Run:
- Place the PicoBot at pose (0, 0, 0) on the floor of the arena.
- Turn the PicoBot power switch to ON. This starts the file
main.pyon the robot. - Open the Bluefruit connect app (cell phone)
- then connect to the first listed of the 2 BLE UART Friend devices
- then select Controller
- then select Accelerometer.
- On the laptop, run the file
display_from_robot.py. It's important to have the phone app already connected so the laptop has no other choice but to connect to the device on uart1.
Here are some notes on some of my early attempts at getting the BLE communication working.
- With the addition of 2 BLE UART Friend modules and multiple sensors sending data on I2C, an I2C multiplexer has also been added.
- A full size breadboard is needed to hold everything.
- Took the opportunity to put the right and left VCSEL distance sensors directly above the wheels.
- Added forward looking VCSEL distance sensor
- Use vector addition to calculate the location of detected points.
- Starting at origin of arena with pose = (0, 0, 0)
- Run No. 1
- Begin driving (in Tele-Op mode) CCW around arena perimeter
- plotting only points detected by right distance sensor (in red)
- Run No. 2 plotting distance values (+ offset) from all 3 sensors
- Left -> RED
- Right -> GREEN
- Front -> YELLOW
Revise driving program: Replace Tele-Operation with a program to drive along a Search & Rescue pattern
- First, do a simple right turn and adjust TRACK_WIDTH until Odometer pose_angle agrees with IMU yaw angle
- Next, drive a long straight leg with a goal_angle = 0 to make sure that pose_angle and yaw are nearly equal at the end of the leg.
- Now we're ready to drive the S&R pattern
- Rotate arena axis 90 degrees from before
- Use Start button to start driving
- The Stop button to stop driving
- Initially, robot is at pose (0, 0, 0) (aimed to the right)
- Make an initial 90 deg turn to the right, then
- Sync pose_angle to yaw just prior to driving in the -Y direction
- Steer to a target angle
- using yaw error as Proportional feedback
- gyro-z as Derivative feedback
- Trip data shows the record of the trip