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 16.04 LTS Xenial Xerus or one of its variants such as Xubuntu, Kubuntu and ROS Kinetic Kame – 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
Office: 137-B Hackerman Hall

Class Meeting Schedule

Times:  Tuesday and Thursdays 1:30-3:00 PM
Location: Remsen Hall 101

Office Hours

  • Monday 2-3PM
  • Wednesday 3-4PM



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 concurently 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 16.04 LTS or one of its variants such as Xubuntu or Kubuntu.  You will also need to install  ROS Kinetic Kame.  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!

Electronic books available through the Milton Eisenhower Library are accessible from on-camps IP addresses. If you are off-campus, you will need to VPN into the campus network to access these electronic books.

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 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 16.04 LTS and ROS Kinetic installed. You can log in with your JHED ID and password.

Wyman 170 Lab Etiquette:

  • Lab is shared with 601.463/663 (~50 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 16.04 64-bit.
  • The only version of ROS we will support is ROS Kinetic
  • Leave the lab spotless.
  • Never turn off the computers
  • 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

Weekly assignments are due at 11:59PM Thursday each week.  10% per day for late submission.

Assignments must build and run cleanly. No credit for assignments that cannot be launched properly.

Independent Project  Demonstration, Exam days (Spring 2021)

Each team will choose a 30 minute time slot to demonstrate their project to me.


Week 1:  Course Overview and ROS Basics


  • Course Overview
    • Course Description
    • Prerequisites
    • Assignments
    • Class Project:
      • Read the project descriptions and especially the lessons-learned from projects completed in previous years available in the project reports available here: 530-707-Dropbox
    • Ethics
  • 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 16.04 LTS (or an equivalent release).
  • Install ROS Kinetic Kame
  • 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)