Robot System Programming



This course seeks to introduce students to open-source software tools that are available today for building complex experimental and deployable robotic systems. The course is grouped into four sections, each of which building on the previous in increasing complexity and specificity:

Students will need to provide a computer running Ubuntu 18.04 LTS or one of its variants such as Xubuntu, Kubuntu and ROS Melodic – note that these specific versions of Linux and ROS are required!

Students should have an understanding of intermediate programming in C/C++. Familiarity with Linux the environment and its administration. Familiarity with software version control systems (e.g. subversion, mercurial, git), linear algebra.  Required Course Background: Familiarity with robot kinematics and algorithms such as those covered in EN.530.646 Robot Devices, Kinematics, Dynamics, and Control and EN.600.636 Algorithms for Sensor Based Robotics, and EN.601.220.  Intermediate Programming in C++ on Linux.


Simon Leonard

Class Meeting Schedule

Times:  Tuesday and Thursdays 10:30-11:45AM
Location: Hodson 216

Parts of assignments will be done during lectures. If you cannot attend a lecture (for whatever reason), I need to know before lectures.

Office Hours

  • Wednesday 3-4PM
  • Friday 2-3PM



530.646  Robot Devices, Kinematics, Dynamics, and Control and 601.463/601.663 Algorithms for Sensor-Based Robotics.  It is OK, if you have previously taken one of these two courses and take the other course concurrently with 530.707.  It is NOT OK to be taking both of these courses while you are taking 530.707.

You must have already taken 601.220 Intermediate Programming in C++  or an equivalent course.  This is a prerequisite,  not a co-requisite.   You must have completed 601.220 or the equivalent before you take this 530.707.

Required Computer

Students will need to provide their own laptop running Ubuntu 18.04 LTS or one of its variants such as Xubuntu or Kubuntu.  You will also need to install  ROS Melodic.  Your computer can be dual boot.  Virtual machines are NOT recommended.


This course will benefit you the most if you are already familiar with the following subjects:

  • Kinematics & Dynamics
  • Basic Machine Vision
  • Basic Probability Theory and Random Processes
  • Data Structures
  • Linear Algebra
  • Linux Operating System
  • Use the following programming languages:
    • Intermediate C++ programming including data structures (absolutely required)
    • bash
    • Python (optional)
  • Use the following markup languages:
    • XML
  • Use the following software tools:
    • Git
    • CMake


Although there is no required text for the course, if you are new to ROS we recommend that you get and read one or more of the following two introductory ROS texts. But really, the best reading for this course are API documentation!

Regarding plagiarism

The strength of the university depends on academic and personal integrity. In this course, you must be honest and truthful. Ethical violations include cheating, plagiarism, reuse of assignments, improper use of the Internet and electronic devices, unauthorized collaboration, alteration of graded assignments, forgery and falsification, lying, facilitating academic dishonesty, and unfair competition.

In addition, the specific ethics guidelines for this course are:

  1.  No teamwork or collaboration on assignments
  2. Public or private sharing of code, assignments

Report any violations you witness to the instructor. You may consult the associate dean of student conduct (or designee) by calling the Office of the Dean of Students at 410-516-8208 or via email at [email protected]. For more information, see the Homewood Student Affairs site on academic ethics:

Read the Graduate Academic Misconduct Policy:

Examples of academic misconduct:

  • Use of material produced by another person without acknowledging its source
  • Submission of the same or substantially similar work of another person (e.g., an author, a classmate, etc.)
  • Intentionally or knowingly aiding another student to commit an academic ethics violation
  • Allowing another student to copy from one’s own assignment, test, or examination
  • Making available copies of course materials whose circulation is prohibited (e.g., old assignments, texts or examinations, etc.)

Teamwork for assignments is not allowed. You cannot use work from someone else (plagiarism). You cannot share your assignments to someone else (facilitating academic dishonesty).

  • You cannot use any material from a classmate or student who took the course in previous semesters.
  • You cannot share any material from this course in future semester.

Any academic misconducts (big or small) will be reported to Graduate Affairs (or Office of the Dean) and will be at least sanctioned by an “F” course grade. No negotiation. I will retroactively sanction plagiarism (i.e. a student plagiarize your assignment in future semesters). This means that you will get a retroactive “F” if your code shows up in a submission in the coming years (and yes, you may have to return your diploma because of that).

Robotics Teaching Lab – Wyman 170

We have 12 workstations with Ubuntu Linux 18.04 LTS and ROS Melodic installed. You can log in with your JHED ID and password.

Wyman 170 Lab Etiquette:

  • Lab is shared with 601.463/663 (~60 students) and 530.646 (~30 students)
  • Never turn off the computers
  • Your account does not have sudo privileges. If you need packages, you must clone/build/run them from your account.
  • The only version of the operating system we will support is Ubuntu 18.04 64-bit.
  • The only version of ROS we will support is ROS Melodic
  • Leave the lab spotless.
  • Never turn off the computers
  • 2GB account (until further notice)
  • Never “lock” a workstation with a screen-saver. Locked computers will be powered off.
  • No Backup!: The files on these computers are NOT BACKED UP. Any files that you leave in your account on these computers can disappear at any time. Use to save your projects during and after every work session.
  • When you are finished a work session, log off the computer.
  • If you encounter a problem: Notify us on Piazza if you have any problems with the lab or its equipment.
  • In case you miss: Never turn off the computers.

Course Grade Policy

Course grade will be based upon ten weekly assignments (50%) , and a final independent course project (50%)

Weekly Assignments

  • Each assignment will be worth 5%
  • Parts of assignments will be done during lectures
  • Expect to have “in class” parts in each assignment
  • Weekly assignments are due at 11:59PM Thursday each week.
  • All assignments are submitted on Github
  • Assignments are pulled at midnight sharp. Whatever gets pulled at that time is what gets graded.
  • Assignments must build and run cleanly. Failure to do so will get a “0”. No appeal.
  • Package structure must be as instructed. Failure to do so will get a “0”. No appeal.


Week 1:  Course Overview and ROS Basics


  • Course Overview
    • Course Description
    • Prerequisites
    • Assignments
    • Class Project
  • Background of Robot Software Frameworks and The Open-Source Robotics Community
  • Development Tools, Managing Code, Environments, Installing Software, Building Code
  • The ROS core systems: Packaging, build system, messaging, command line & GUI tools, nodes, topics, services and parameters.
  • Writing a Simple Publisher and Subscriber (C++)
  • Examining the Simple Publisher and Subscriber
  • Writing a Simple Service and Client (C++)
  • Examining the Simple Service and Client



  • Install Ubuntu 18.04 LTS (or an equivalent release).
  • Install ROS Melodic
  • Complete these Tutorials
    • Installing and Configuring Your ROS Environment.
    • Navigating the ROS Filesystem
    • Creating a ROS Package
    • Building a ROS Package
    • Understanding ROS Nodes
    • Understanding ROS Topics
    • Understanding ROS Services and Parameters
    • Using rqt_console and roslaunch
    • Using rosed to edit files in ROS
    • Creating a ROS msg and a ROS srv
    • Writing a publisher and subscriber in C++
    • Writing a Simple Publisher and Subscriber (C++)
    • Examining the Simple Publisher and Subscriber
    • Writing a service and client in C++
    • Examining the Simple Service and Client

Week 2:  Roslaunch, Nodes, tf, Parameters, and Rosbag


  • rosbag
  • roswtf
  • tf
  • Rviz
  • Getting and setting parameters in roslaunch and C++ nodes



Week 3: URDF and Robot State Publisher


  • Unified Robot Description Format (URDF)
  • Robot State Publisher



  • Learning URDF Step by Step
    • 1. Building a Visual Robot Model with URDF from Scratch
    • 2. Building a Movable Robot Model with URDF
    • 3. Adding Physical and Collision Properties to a URDF Model
    • 4. Using Xacro to Clean Up a URDF File
  • Learning URDF (including C++ API)
    • 1. Create your own urdf file
    • 2. Parse a urdf file
    • 3. Using the robot state publisher on your own robot
    • 4. Skip this one for now: Start using the KDL parser (You can skip this tutorial for now if you like, it is not required for this module’s assignment.)
    • 5. Using urdf with robot_state_publisher

Week 4: Gazebo Intro, SDF, and worlds


  • Simulating robots, their environments, and robot-environment interaction with Gazebo
  • Gazebo ROS integration.
  • NOTE: You do not need to install Gazebo. Your full ROS kinetic desktop installation will have installed Gazebo V7.0.0 So DO NOT follow the installation instructions on If for some reason the ros gazebo package is not installed, install it with sudo apt-get install ros-kinetic-gazebo-ros ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
    • You can verify that Gazebo is installed by issuing the command “gazebo” on the command line – a gazebo window should open after a few seconds delay.
  • NOTE: Gazebo is CPU-intensive, and will not run very well in virtual boxes.


  • Gazebo Overview
  • Gazebo API
  • SDFormat Specification: The SDF XML file format is a superset of URDF.  SDF files are how Gazebo defines robots and the environment. You can generate SDF from URDF or XACRO on-the-fly, so in practice it is easier to maintain a single XACRO file, and use it to generate URDF and SDF from it on-the fly.

Week 5: Gazebo physical simulation, ROS Integration

Preliminary Project Ideas Due 10:30AM Thursday March 2, 2021


  • Simulating robots, their environments, and robot-environment interaction with Gazebo
  • Gazebo ROS integration.
  • Gazebo Intermediate Concepts



Week 6: Jackal, Joy, and ROS Node development in C++


  • Installing and testing joysticks
  • Publishing /joy topic with the ROS joy package
  • Joystick tutorials – including teleoperating a robot from a joystick
  • ROS timers
  • Writing your own package to subscribe to the joystick /joy and publish a geometry_msgs/Twist topic to command the EduMIP.
  • Writing launch files for same.
  • Running ROS systems spanning more than one computers.


Week 7:   Turtlebot-2 Simulation in Gazebo, SLAM Navigation, Adaptive Monte-Carlo Localization

This assignment demonstrates a larger robot system using sophisticated ROS packages to use a simulate mobile robot and  Simultaneous Localization and Mapping (SLAM) algorithms to construct a 2D map, and then to use the map to do 2D adaptive monte-carlo navigation of this robot, all using existing available ROS packages.





  • Formulate your class project and
  • Form your team
  • Write your project proposal.
  • Get your project proposal approved by Prof. Leonard.
  • OROCOS Kinematics Dynamics Library


Week 9: ROS Control and Plugins



Week 10: MoveIt! Plugins


  • MoveIt!, path planning and plugins


Week 11: Rviz Plugins

Week 12: Orocos Realtime-Toolkit (RTT)


Week 13: Orocos Bayesian Filter Library (BFL)