ECE434 Project - ROS

Revision as of 07:50, 16 November 2021 by Hummelmd (talk | contribs) (Packaging)
Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder

Team members: Matt Hummel Garrett Hart

Grading Template

I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!

09 Executive Summary
09 Packaging
09 Installation Instructions 
09 User Instructions
09 Highlights
09 Theory of Operation
09 Work Breakdown
09 Future Work/Conclusions
09 Demo/Poster
00 Not Late

Score:  90/100

Executive Summary

The Robot Operating System(ROS) is a large group of open-source software libraries and tools designed for robotic applications. While ROS is called an operting system, it is more accurately described as middleware. ROS includes drivers and algorithms for nearly every possible desired robotics application, including but definitely not limited to:

Network Communication (ros_comm)

Control Systems (ros_control)

Robotic Kinematics (ros_moveit)

Data Structures (ros_msgs)

Logging (ros_logs)

Navigation (ros_navigation)

Data Recording (ros_bag)

Robot Visualization (rviz)

Robot Simulation (gazebo)

Data Visualization (rqt, plot_juggler)

Odometry (ros_odom)

Linear Algebra (eigen)

Geometric Transforms (tf, tf2)

Action Servers (ros_actionlib)

Standardized Launch (ros_launch)

Parameter Server (ros_param)

just to name a very limited selection. Because of it's variety of powerful tools, ROS is used a wide variety of industry applications for intelligent robotics.

The goal of our project is to demonstrate some basic capabilities of ROS on the BeagleBone Black (BBB). While the BBB is not officially a supported platform by ROS, ROS is universal enough to be adapted to most linux-based platforms. For the our purposes, we will be demonstrating motor control over a network and data logging+visualization using ros_comm, ros_log, rqt and ros_bag. We will be using a base operating station(Ubuntu 20.04 machine) with an Xbox gamepad controller as the user interface, while the motor control will be handled by the BBB.


For best use, the PWM outputs of the BBB should be attached to motor controllers to drive a robot. For our demonstration purposes, we used LEDs to show the PWM signals.

Installation Instructions

The first step in creating a ROS project is installing ROS onto your platform. Unfortunately, ROS does not officially support the BBB and therefore does not have available binaries for installation from a package manager. For this reason, ROS will need to be built from the source code. Instructions to complete this on the debian 10 (buster) installation we used for the BBB can be found at The version of ROS that will be compatible for compiling on Debian 10 is ros_noetic. Note: compiling ROS took approxiametely 15 hours on the BBB, so plan accordingly.

To set up base station machine, there are binaries available. Using an Ubuntu 20.04 machine, follow the directions at The base station can also operate off of Ubuntu 18.04 with ROS Melodic, if preferred.

To configure the ROS network for communication between the base station and the BBB, follow the intructions at Specifically, add the following lines to ~/.bashrc:

export ROS_MASTER_URI= //Note: substitute for "bone" if you have configured your /etc/hosts

export ROS_IP= //IP of the base station, the Bone should have in it's bashrc

This way ROS on the base station will recognize the that the overarching management node for ROS, roscore, will be on the BBB and they will be able to link. Next, we will need to add create our workspace and add the project code. Repeat these steps on both the BBB and base station:

$: mkdir -p ~/ros_ws/src

$: cd ~/ros_ws

$: catkin_make

$: cd src

$: git clone

$: cd ~/ros_ws

$: catkin_make

$: source devel/setup.bash //It is recommended to add this line to ~/.bashrc for ease of repeatability

User Instructions

To run the code, first start roscore on the BBB:

$: roscore //it is recommended to start this in a tmux session, and leave it detached

Then in a separate terminal session, start the BBB motor code:

$: rosrun Motors

Finally, on the base station with the Xbox controller attached, start the Driver's program:

$: rosrun Xbox

Now you can control the motors using the Xbox controller on the base station. To simplify this startup process, checkout

On the BBB, you can view the recorded log files using:

$: roscd log

And finally, you can record and view the joystick data. To view live, on the base station:

$: rostopic echo /commands

Or if you prefer a graphical display,

$: rqt_plot /commands

To record and then play back a bag file:

$: rosbag record -o <bag-name>.bag /commands

$: rosbag play <bag-name>.bag


While there might be easier ways to control a motor over a network and log the data, the real point of this project is to demonstrate that the BeagleBone is capable of implementing all of the powerfull tools in ROS. This means that the BeagleBone could be used in projects of a similar scale as Boston Dynamic's Spot, or Amazon's package delivery robots.

Include a YouTube demo the audio description.

Theory of Operation

The main "core" of ros is the roscore node. This node acts as the center for all other nodes to connect to to integrate together. In this application, the roscore node is running on the BeagleBone.

The other two nodes, the Xbox parser and the motor controlling nodes, run on the base station and the beaglebone respectively. The Xbox parser node reads data from the USB Xbox controller, a publishes the data to the ros topic "commands". The motor controlling node then subscribes to the "commands" topic and reads the data published by the Xbox parser. That data is then used to control the speed a direction of the motors connected to the BeagleBone.

Both nodes are also logging data to their respective log files located at ~/.ros/log.

For the rqt and bag files, data is pulled from the /commands topic. RQT plots the data, while the bag file records the exact time of each published value on the topic. Therefore when the bag is replayed, it is able to repeat the topic's behavior exactly as it was.

Work Breakdown

1. Installing ROS on the BeagleBone - Matt

2. Installing ROS on the base station - Garrett

3. Configuring ROS - Matt

4. Writing the Xbox software - Matt

5. Writing the Motor software - Matt

6. Wiring the system - Garrett

Future Work

This project has nearly endless possibilities for continued work, as the ROS platform is immense in scale and capability and growing constantly. One common application of ROS which could be added to this project is to implement an autonomous vehicle with localization sensors and an active map to navigate terrain. For a list of projects that this could be expanded into, check out

It is also very common for mobile robotic platforms to communicate wirelessly, since a physical connection becomes a constraint. Because of this, a logical next step for this project would be incorporating a WIFI connection.


ROS is an extremely powerful tool, and it used fairly universally in the world of robotics. The BeagleBone Black is not an officially supported platform for ROS due to being a 32-bit system, but we have been able to demonstrate that the BeagleBone is capable of running this software platform. This demonstrates that the BeagleBone is also capable of many more complicated tasks like robotic arms and autonomous vehicles.

thumb‎ Embedded Linux Class by Mark A. Yoder