Building an Inexpensive 3-D Printed ROS Robot
Building an Inexpensive 3-D Printed ROS Robot

Built around a Pi4, low cost gear motors, and an RPLidar A1

Modified Weddell 2 from Thingiverse

I recently began playing with ROS in simulation, and am really enjoying it. I want a platform that I can use for experiments, particularly learning to configure a physical robot for SLAM and navigation. If you are not familiar with ROS, or have been intimidated by the steep learning curve, you might want to give my introductory article a look first.

I stumbled on the Weddell 2 ROS Robot by user pokpong on Thingiverse, and was very impressed. It was very close to what I was after. I couldn’t source the motors the original device used, so I made a remix of that design that was set up for inexpensive gear motors with encoders. I hope this write-up is useful if you want to do something similar. The modified files are here.

The chassis is printed in PETG on an Ender 3 Pro. The parts require rafts and supports to print without warping, and the supports need to be gently cut away with an hobby razor knife. Holes tend to print a little small because of the way the slicer works, so it’s best to drill them to size.

The original design used some German gear motors that I had trouble sourcing (and frankly, they look expensive). They are probably overkill for my application, so I opted to modify the baseplate to mount these inexpensive gearmotors with integrated encoders. I wanted a robot that was slow with plenty of torque, so I used a robot wheel speed calculator to figure out what RPM I needed to get the speed range I wanted.

I used OpenSCAD to modify the base STLs, by plugging the holes I didn’t need and punching new ones for the motor mounts. The same plate is printed twice to make mirrored sides.

The sides and decks are assembled with M3 socket head screws and M3 locknuts.

Base with motors installed with brass hex adapters for RC wheels

I used a 1" caster I had from a previous robot chassis. With these motors and this caster, I needed larger wheels to get the ground clearance I wanted, so I opted for this set of 85 mm wheels with tires. The brass wheel adapter included with the motor set will fit standard R/C car hex wheels, so you can mount a large variety of them.

Underside of base showing caster

The design of the masks by pokpong makes clever use of pockets that trap an M3 nut — once you remove the support material, they lock right in. The vertical printed structures are called “masks” in his design, and he includes several with different kinds of cutouts for sonar, battery sockets, and a Raspberry Pi camera. I only used the camera mask, and the plain mask for the rest of the supports.

I modified the masks to make them a bit easier to print — the originals came to a very sharp edge on the bottom, resulting in little contact area with the print bed. I had several of them fail in printing with the original, so I used OpenSCAD to clip off the sharp edge.

Detail of mask showing M3 captive nut

I selected these 50 mm aluminum standoffs in black for the vertical risers. The battery pack sits behind the motors.

Masks and wheels mounted

To join the standoffs between levels, you need M3 threaded rod. I didn’t have any, so I selected my longest M3 screws, cut the caps off with a rotary tool, and cleaned up the cut end with an M3 tap.

M3 riser connectors

My electronics deck is currently pretty minimal — it includes a Raspberry Pi 4 running Ubuntu and ROS, a motor driver, and an Arduino UNO running rosserial to set motor speeds and publish battery voltage. A mostly empty shield board has a voltage divider on the battery input to bring the battery voltage into the range that the ADC on the Arduino can read. This is seriously limited on RAM — I’m working on a replacement with a Teensy ARM processor that will be more capable. This board is OK for testing, but would not be able to run other peripherals like IMU and encoders without running out of RAM. The rosserial library uses a considerable amount for each publisher and subscriber.

Power for the Pi and Arduino is provided by a 5 volt 3 amp battery eliminator circuit normally used on R/C aircraft. Power is soldered to the test pads on the Pi. PCB standoffs are 3D printed.

Electronics deck

A Raspberry Pi camera is mounted to the forward mask on the electronics deck behind the glare shield. The standard camera’s field of view is not restricted by the glare shield. The camera uses little tiny M2 nylon nuts and bolts to secure it to the mask.

Electronics deck with camera mounted

Wires are secured with zip ties. Power is currently a 2200 3S LiPo RC drone pack with XT60 connectors, though I may upgrade to a larger pack once I am farther along.

Next steps are to get the Teensy board working with a SparkFun IMU and counting encoder pulses from the motor, and publishing the appropriate topics. If that works, it should be able to keep rough track of where it is by fusing the odometry and IMU data. That will be the subject of a future article! I expect that to take some work.

LIDAR deck

The LIDAR unit mounts easily on the top deck — I’m very impressed with how easy it is to get it up and running in ROS. I’m excited to get some SLAM going!

Initial testing has gone well under manual teleop control — it feels precise and has plenty of power. The PETG parts seem quite durable — we’ll see how they hold up under lots of use.

See room for improvement? I would love to get your input and ideas!

Author’s note: The links in this article are not affiliate links.
['Jason Bowling']
['Robotics', 'Raspberry Pi', '3D Printing', 'Technology', 'DIY']