It’s been a year since I moved to a different continent, which required disassembling all of my robots. I managed to get my flagship robot, SMUB, in working order again, and here’s some notes about changes I made, and future plans with the robot.
The Old Controller Box
The previous version of the controller box was poorly organized. Its primary purpose was to house the Raspberry Pi and the two ODrives, the essential hardware needed to operate the robot. The construction process was rather improvised: I initially printed a large enough enclosure for the ODrives, used 3D-printed mounts, and attempted to fit everything inside. Concerned about inadequate ventilation potentially damaging the ODrives, I cut an opening in the enclosure and hastily added some fans for airflow. There wasn’t enough space for the Raspberry Pi, so I resorted to attaching it to the exterior with double-sided tape, using a 3D-printed case from Thingiverse. While this setup was functional, it was visually unappealing and occupied more space than necessary. I had delayed designing a proper enclosure for the two ODrive boards and the Raspberry Pi, but now I finally have the result.
Old controller box
The New Controller Box
In designing the new controller box, my primary goal was to incorporate proper connectors for the BLDC motors, specifically for the three-phase wires and encoder wires. I chose MT60 connectors for the three-phase connections and GX12 5-pin connectors for the Hall effect encoder wires. The GX12 connectors are particularly advantageous because they screw in securely, preventing them from disconnecting during operation, which could lead to a hazardous spinout of the affected wheel. I also ensured there is a sufficiently large opening to accommodate any necessary cables, such as the USB cables connecting the ODrives to the Raspberry Pi and the e-stop connections plugging into the ODrive boards. Although the USB connections between the ODrives and the Raspberry Pi could be replaced with UART connections directly to the Raspberry Pi’s GPIO pins, I haven’t implemented this change yet.
The colored wires coming out of the big hole are for the E-stop and brake resistors (TBD).
Future Plans
Jetson Xavier AGX:
come up with a proper case / mounting solution
PCI multi usb hub?
Unfortunately Nvidia stopped supporting this hardware (whowouldathunk???) but luckily jetson-containers makes it easier to run up-to date software stack.
IMU: I recently got a hold of a proper 9-axis IMU MW-AHRS-X1. Officially, only ROS2 is supported, but I found a ROS1 driver package for it and successfully ran it. Previously, I was using the built in IMU of the ZED camera, which has maximum 400Hz of IMU update. I should be able to get up to 1000Hz from the new IMU. Hopefully this would lead to better lidar inertial odometry.
Revisit Lidar SLAM: test whether Multi-lidar FASTLIO2 will work with the combination of Livox Mid70 and a Velodyne VLP-16.
Robotic arm: LeRobot seems to be the new cool guy in robotics, and it’d be cool to play around with a robotic arm. The RoArm-M3 Pro seems like a decent choice - not too expensive and not too small. Seems to have ROS2 support as well. Seems to be comparable to the WidowX 250S but an order of magnitude cheaper.
DIY 4x4 ROS-enabled rover robot with BLDC hub motors
In this article, we will be exploring the design and construction of SMUB, a DIY 4x4 ROS-enabled rover robot. The purpose of this project was to create a robotics research platform that was capable of traversing rough terrain, while also being small and lightweight enough to be easily transported and handled. I will be sharing the details of my design process, including the challenges and successes I encountered, in the hopes that it may be useful to others interested in building their own rover robots. Whether you are an experienced robotics professional or are just starting out in the field, I hope that my experiences and insights will be of value to you as you embark on your own projects.
Design and Materials
When designing SMUB, my main goal was to create a rover robot that was capable of traversing rough terrain and small enough for one or two people to lift. I wanted SMUB to be a viable home-built alternative to commercially available robots, such as the Clearpath Husky, that are often more expensive.
I used Fusion 360 to design and visualize the various components and features of SMUB. This included importing existing parts to get a sense of their size and dimensions, positioning and cutting the structural parts, and designing additional parts that had to be 3D printed. Fusion 360 was a valuable tool for ensuring that the various components of the robot fit together properly and functioned as intended.
For the structural part, I used a combination of strong and lightweight materials, including 30 cm x 30 cm aluminum extrusions for the frame, and 1 mm aluminum sheets for the surface.
Earlier iteration showing the aluminum frame
The aluminum extrusions were a good choice for the frame because they were strong, yet easy to cut and assemble using basic tools. I used brackets and T-slot nuts and bolts to join the extrusions together, forming a rigid and stable structure. I covered the surface of the robot with aluminum sheets to protect the electronics and provide a smooth and durable surface. To cut the sheets to size, I used a simple method involving a straight edge and a sharp knife.
In addition to the aluminum extrusions and sheets, I used a range of other materials and components to complete the robot. These included motors, sensors, computers, batteries, and various connectors and cables. I sourced most of these components from online retailers, such as ODrive Robotics, AliExpress, and Amazon. I also used 3D printed parts from Thingiverse to create custom mounting brackets and other components that were not available off-the-shelf.
Capacitors used to filter the hall signals and ensure smooth and accurate operation of the ODrive controllers (Refer to this discusssion on ODrive forum.)
One of the key considerations in the design of SMUB was the choice of motors. I initially experimented with hoverboard motors, but quickly realized that they did not provide enough torque, especially at lower RPM. Refer to this, this and this to see how hoverboard motors behave in a 4x4 skid-steer configuration with wheels of about 25cm diameter. In the 4x4 skid steer configuration, the hoverboard motors didn’t have enough torque in order to reliably overcome friction, especially when making tight turns.
In order to address this issue, I switched to geared BLDC motors, which offered a higher torque-to-weight ratio and better performance at lower RPM. These motors were purchased from Aliexpress and were a much better fit for my needs. They were able to handle the demands of rough terrain and skid steering.
Trolleys / fruit carts / trucks/ Agricultural vehicle
Electronics
The electronics of SMUB are an integral part of the robot’s functionality and performance.
Connection diagram of SMUB
To run custom software and communicate with other devices, I used a Raspberry Pi as the onboard computer for communicating with the “hardware”, and a Jetson AGX for processing data from more advanced sensors and performing resource intensive tasks. The Raspberry Pi is a versatile single-board computer that can run a wide range of software and connect to various sensors and peripherals. The NVIDIA Jetson AGX is a high-performance computing platform designed for autonomous machines and robotics applications.
SMUB includes a wireless router, which allows multiple machines within the robot (such as the Raspberry Pi and Jetson AGX) to communicate with each other. This allows me to run multiple compute tasks on different machines and easily share data between them.
To read encoder sensor data and control the motors, I used ODrive controllers, which are high-performance BLDC motor controllers that support sinusoidal commutation and various encoders. I soldered on 22uF capacitors on the encoder pins to filter the hall signals and ensure smooth and accurate operation. Refer to this discusssion on ODrive forum. I wrote a ROS node for communicating with the ODrive controllers and controlling the wheels, as well as reading data from the encoders, voltage/current meter, and temperature sensors. This node was an important part of the control system, and allowed me to easily integrate the control system with the rest of the ROS stack.
I also included a FlySky FSi6B receiver that talks to the Raspberry Pi through a USB to TTL Adapter, which allows me to control the rover robot remotely using a typical hobby RC controller. I used this ROS package to publish cmd_vel using the RC controller. Refer to this page for more detailed information.
SMUB also includes a number of other electronic features to enhance its functionality and safety. These include an emergency stop switch, a front panel LCD voltage/current/power meter, and a small OLED display that can display any text I want to publish as a ROS message. The e-stop can be connected to the ODrive so that when the button is pressed, it pulls (and hold) nRST pin low on header J2.
To add a visual element to SMUB and make it more visible to others, I included a set of rear lights that could be controlled by an Arduino. I wrote a custom Arduino sketch that subscribed to the cmd_vel topic published by the robot’s onboard computer, and used the velocity and steering commands to mimic the behavior of a normal car. For example, if the robot was turning left, the left turn signal would flash yellow, and if it was turning right, the right turn signal would flash yellow. If the robot was moving in reverse, the reverse light would turn on.
Sensors
I won’t write too much about sensors in this post, but below is a list of different sensors I’ve integrated and tested on SMUB.
Cameras
Realsense D435 (depth) + T265 (odometry)
Stereolabs ZED2i (stereo depth)
Ricoh Theta V (360 degree)
Lidars
RPLidar A1 2d lidar
Velodyne Puck
Livox Mid 70
Visualization of raw sensor data from ZED2i and Mid-70 in RViz
Summary
This article explores the design and construction of SMUB, a DIY 4x4 ROS-enabled rover robot. The robot is designed to traverse rough terrain while being small and lightweight enough to be easily transported and handled. The article details the design process, including the challenges and successes encountered, and provides a rough bill of materials. The article also discusses the choice of motors and electronics used in the robot, including the use of geared BLDC motors and a Raspberry Pi as the onboard computer. The CAD file for the robot is available on GrabCAD.
tip ground contact sensors (tactile switches) using rosserial_arduino
wrote a ROS node that publishes the tip sensor data in a format openshc understands.
want to make it into a decent rough terrain crawler
servos seem to reach thermal limit quickly - added fans to motors
2d and 3d slam using a 2d lidar and a depth camera with hector mapping and rtabmap packages
Videos
Indoor 3d SLAM with d455 and exploring various sensor data
Here I manually control the hexapod with a ps4 controller around the room. ROS master node is running on the bot on a Jetson NX. It has a 2D lidar and a Realsense depth camera. It runs the openshc package for hexapod control, and rtabmap for 3D SLAM. Visualization is done on a desktop machine on the same network.
Long video of testing the admittance controller
Short screen capture of exploring variables on rviz/rqt
Outdoor flat forest floor traverse test
Some Pictures
Side by side with Make 2 Assembled Close up Visualization of topic data from openshc with rqt and rviz Added fans Silicon anti slip cap (and the mould)
control software written in python using numpy, scipy, servo controller library.
4dof legs -> no analytical solution for inverse kinematics. Implemented an iterative method for 4dof leg IK solution. Also can use an optimizer from scipy.optimize.
basics of the endeffector position based control algorithm code in this jupyter notebook
power system is janky - sometimes when the servos draw too much power at once, the sbc reboots.
learned to use Fusion360 to design parts needed using a 3D printer.
parts:
banana pi zero
7x buck converter
GY210 IMU
2s lipo
24x towerpro MG90B servos
2x 12ch pwm controller board
one buck converter provides 5v to the sbc
the servo controller boards get power from sbc
four servos (one leg) get power from one buck converter
sbc, servo controller boards, and the IMU talk through i2c