Mr Siefens Robot Emporium Logo

More Posts

My First FTC ROSbot Pt. 1

Originally Posted: Oct. 27, 2022

Last Edited: Oct. 29, 2022 - 1:18 AM EST

Author: Mr. Siefen

Code Repo: https://github.com/mrSiefen/MyFirstFTCROSbot

What is a FTC Robot and What makes this a FTC ROSbot?

FTC, or F.I.R.S.T. Tech Challenge, is a S.T.E.M. Robotics competition for Middle Schoolers in Michigan and 6th-12th graders in various places worldwide. While I will be using FTC hardware, the OnBot Java code and other F.I.R.S.T. related tools, this is NOT intended to be a Competition Ready solution. I do NOT recommend ROS at a Middle School level. I would even find it hard without a very dedicated audience of High Schoolers and Undergrads in College.


This FTC bot is not designed to tackle a specific game challenge, but instead to show how to connect ROS to existing robotic systems. This will be a crash (and burn) course in some ROS basics, a small guide into connecting systems to each other via Serial communications, and how to get basic ROS control of the Expansion and Control Hubs. The added challenge is FTC robots are typically limited to an 18 inches cubed volume in their starting configuration.


FTC Mecanum Robot gif

This means I'll have to keep my hardware small and light! It's also the perfect size to have in a household as it's only 29.49% bigger than an average Roomba!


If ROS is that Difficult, Why Bother?

The hardest parts of learning ROS, at least in my opinion, lies in the lack of GOOD hardware documentation for beginners. At it's core ROS is just a Client/Server network just like MQTT. They are both built around the TCP/IP comm protocol, they both use subscribers and publishers and they both have topics. What separates ROS from a traditional network stack is the focus on Robotics, passing robot sensor data like 3D point clouds and more to networked devices in sync and in a hurry.


ROS topics have specific data formats of how messages are expected to be sent along the network. ROS nodes publish and subscribe to those topics and do "things" based on the data. Published data has a Frame and ID so subscribers can sync sensors together at one moment in time. All nodes talk to a "Master" that runs roscore (the ROS topic server) on a network. Nodes get alerted whenever new data is published to a topic they are subscribed to.


This can all get rather messy, scary and confusing and hence the difficulty.


r2d2 having a bad day gif

Don't run away screaming just yet! This difficulty is very much worth the learning curve. A good example is the cmd_vel topic. All robots move, all robots move in 3 dimensional space, therefore there should be one unified way of telling any mobile robot how to move at a target speed in 3 dimensional space.


If ROS is that Difficult, Why Bother? cont.

Cmd_vel is the topic our Tele-op Controller, Autonomous Navigation Stack or any other clients can publish to in order to control the robots velocity. Cmd_vel has linear X,Y and Z values in m/s and Angular X,Y and Z values in Rad/s. Now all the developer has to do is subscribe to cmd_vel once and anytime an update to the data is made from any client the motors will react the same way every time. That is super powerful stuff!


ROS has many conventions like cmd_vel where all robots tend to do X so why should everyone keep rebuilding the same code to do X over and over in slight variations. Instead we should adopt standard ways of packing all sensor data, from Encoders to Lidars, in a format any subscriber can make use of. Those ROS packages can be shared to other ROS developers to include in their own robots or modify and improve upon.


robot time at the beach gif

The main benefit to any robot developer is clear then, less work rewriting the basic like controlling wheel speeds and more time relaxing... okay, maybe more time doing better stuff like Vision Recognition, Mesh Navigation and Traffic Control, etc. It also becomes easy to link new systems in (given the hardware supports some method of connecting to an Ubuntu PC) with way less work than traditionally required.


How much is an FTC Robot kit on average?

As I mentioned earlier the hardest part of learning ROS in the beginning is getting a good hardware stack. I've gone through dozens of hobby and professional motor controllers, control boards, robot brains, etc. They all have pros and cons, and none are straight forward plug and play devices in ROS. What the FTC hardware (control/expansion hub) do a phenomenal job of is controlling low level robotic hardware.


You can attempt to accomplish the same by starting with a PI, Jetson or Arduino alone, but the GPIO, Modules for Motor control and everything else will cost just as much. You can try to start with a little robot car kit from elegoo on amazon, but youll quickly realize how limited the A-B is and want more. That smart car kit is now a smart paperweight.


The stock FTC kits even without ROS are a great choice for a S.T.E.M. learning tool. The issue is the cost... A FTC starter kit V3 from Rev Robotics is currently $695.00 (as of 10/27/22) and this kit still needs an expansion or control hub (another $250-$350). When I compare that to the cost of getting an IMU, 4 motor controllers with encoder inputs, dedicated digital, analog and i2c lines, 6 Servo drivers and a Raspberry Pi to run it all it's about the same.


Not only does the FTC kit get the hardware right, but then theres the added benefit of not having to track down all the sensor libraries, link em up to the robot with a series of adapters and power convertors. That mess goes away and you the developer get to the developing part sooner. So is the time to cost worth it? To me yes, to others maybe not?


shrugging elmo gif

The Cost Doesn't Change the Facts

You have an easy to adapt and modify chassis and basic gears, pulleys and expansion pieces to make arms, ball intakes, frisbee throwers, whatever you want. A good structure for your electrical, code and sensor systems that has good documentation. While the FTC base kit is NOT ROS enabled by default, we can fix that really easily! My budget for low cost means around $1,000 so this qualifies. Other ROS enabled robot kits routinely go above that mark without having much to show for it.



Below is a playlist of some of the really cool robots made using the FTC hardware by Middle School and High School teams from around the world. Maybe this will give you some more ideas of how flexible this kit can be in the right hands.



All of those other "Starter" kits focus on the Autonomous Navigation aspects of ROS. While thats useful any roboticist knows that "GOING IS HALF THE BATTLE". As soon as you crack natural navigation you'll want to move a real payload, change the chassis, add more motors and NONE of those other kits offer that. The FTC kit gives you that flexibility for around the same price with the room to grow with your knowledge.


going is half the battle gif

What Materials are Needed to Make a FTC ROSbot?

You can find a complete B.O.M. (Bill of Materials) for my Robot Kit as I go here. Your kit does not have to be the same as mine piece for piece. The whole benefit of the starter kit is getting components to customize the robot to your liking.


The main things needed are an expansion hub (at least 1 E hub + 2 android phones) or an expansion hub and control hub combo. The Control Hub is just an Expansion Hub with the hardware of the Robot Controller Phone baked in. Below is a list of the possible hardware combinations and what that combinations capabilities are.


Combo #1

1 Control Hub + 1 Expansion Hub + 1 Driver Hub (Replaces DS Phone) - $850.00


Combo #2

1 Control Hub + 1 Expansion Hub + 1 DS Phone - $650


Combo #3

2 Expansion Hub + 1 RC Phone + 1 DS Phone - $600


Combo #4

1 Expansion Hub + 1 RC Phone + 1 DS Phone - $450


# 1 # 2 # 3 # 4
Motors 8 8 8 4
Encoders 8 8 8 4
Servos 12 12 12 6
Digital IO 16 16 16 8
Analog Input 8 8 8 4
I2C Ports 8 8 8 4
RS485 Open 3 3 3 2

What Materials are Needed to Make a FTC ROSbot? cont.

The math seems to point towards #2 or #3 when you examine the numbers on paper(or pixels). This makes sense for 1 key reason. The Control Hub and Driver hub can both be swapped out for Android Phones. An Android Moto e4 Plus (What I'm using personally for this) is $50 while a Driver Hub is $250. There isn't alot of merit for combo #1 at all. The Driver Hub does what the DS phones do but for 5x the cost.


Combo #3 is the cheaper than #2 but you lose out on the actual benefit the Control Hub actually does provide over the Robot Controller Phones. The Control Hub combines the $250 Expansion Hub with what the RC phone does plus gives you HDMI, usb and MicroSd for $350. With those additions you can program the robot on the go with no computer needed. Plug a monitor into the control hub, add a keyboard and mouse and off to development you go!


Combo #4 is the cheapest option for good reason. You lose the control hub and half of your ports! You can build a good robot with the limited ports here, but Mecanum alone needs 4 motors leaving you out of additional slots when you want them. You can always add a control hub or expansion hub later though! The main benefit of combo #4 is the super low cost at the cost of ports for advanced functions later. So now we've reached our decision point.


Nervous decisions gif

Don't stress about deciding. Combos #2 and #3 are both good solutions and will both perform equally well. It's really a personal decision you have to make about whether the nice things the Control Hub offers are for you at the slight price difference. All of these combos get you the basic "Brain" and "Nervous System" of your robot. You STILL need to pick motors, structure, gears, pulleys, etc. I've listed FTC kits below from REV that have those other components or even some kits have Hubs.



What Makes this Hardware ROS Compatible?

ROS has more nodes and packages than I could ever explain fully in blog form. Some of my personal favorites involve Serial communications. rosserial, rosserial-arduino and rosodrive all use USB, RS485 or UART serial to talk to an Ubuntu ROS client. That client is able to talk the low level hardware, talk at a semi-high level of Serial and publish the data out to the rest of the clients on the network. Since the Expansion Hubs and Control Hubs support RS485 and UART (2 ports each, but one is taken to use an expansion hub with a control hub), we can write our own ROS node to talk directly to them.


Learn more about RS485 below



What really gave me hope was learning more about the FTC SDK via gm zero. Gm zero has tons of great FTC info but also general robotics info about manufacturing, design, etc. I highly recommend this wiki and will be referencing it often.


gm zero wiki game manual zero ftc robot guide gif

That was alot to take in at once. If you are completely new to the FTC hardware I suggest snagging a copy of the Rev-Duo Guide PDF. Give that a good read through and if you purchase an FTC REV kit follow that guide to the letter. It gives you everything you need to control the hardware for really cool stuff, right out of the box! Come back for part 2 or check out my other blog posts to learn more about this topic and many others. You can also use the navigation arrows at the top of this page to go in chronological order through all of the posts. See you next time!