Robot System Programming

Robot System Programming

Contents

Description

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:

  1. tools and frameworks supporting robotics research
  2. robotics-specific software frameworks
  3. integrating complete robotic systems
  4. an independent project of the student’s own design using small mobile robots or other robots in the lab

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++ (including data structures and dynamic memory allocation). 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.

Course-Related Web Pages

Instructors

Faculty

Simon Leonard
Assistant Research Professor
Laboratory for Computational Sensing and Robotics
Johns Hopkins University
Office: 137-B Hackerman Hall

Teaching Assistants

  • Lezhou Feng
  • Hao-Che Chiu

Class Meeting Schedule

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

Office Hours

  • Monday 14-15PM: Simon Leonard, 137-B Hackerman
  • Thursday 1:30-3PM: Simon Leonard, 137-B Hackerman
  • Friday 10-11AM: Simon Leonard 137-B Hackerman

Prerequisites

Courses

You must have taken both of “core” robotics courses 530.646  Robot Devices, Kinematics, Dynamics, and Control  and also 601.463/601.663 Algorithms for Sensor-Based Robotics.  It is OK, if you have previously taken one of these two courses, for you to concurrently take the other course while you are taking 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.   No exceptions.

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.  Linux installations in a virtual machine are NOT an acceptable substitute.

Knowledge:

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

Textbooks

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:

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 integrity@jhu.edu. For more information, see the Homewood Student Affairs site on academic ethics: https://studentaffairs.jhu.edu/policies-guidelines/undergrad-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 6 computers with Ubuntu Linux 16.04 LTS and ROS Kinetic installed and five TurtleBot 2 mobile robots in the Wyman 170 Lab. By Feb 3 or so we hope to have everything set up so that you can boot the computers into Linux, and log in with your JHED ID and password.

Wyman 170 Lab Etiquette:

  • Lab is shared with 601.463/663 (~70 students) and 530.646 (~30 students)
  • 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 “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 https://git-teach.lcsr.jhu.edu 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.

Git Repository for Handing in Assignments

All assignments and projects for this course will use the git repository https://git-teach.lcsr.jhu.edu.  You may not submit assignments with other git repositories.  

You should already have an active account our account on https://git-teach.lcsr.jhu.edu.

Test your account by  browsing to  https://git-teach.lcsr.jhu.edu and log in with your JHED credentials.

If you have problems with your account on https://git-teach.lcsr.jhu.edu, please send an email addressed to both of (a) the course instructor (sleonard@jhu.edu) and (b) Mr. Anton Deguet (lcsr-it@jhu.edu).

When you create your assignment projects, please use precisely the project name specified in the assignment, and add the course instructor (sleonar7), and the TAs (lfeng12, hchiu13) as members of your projects, all with DEVELOPER access.

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.  No credit for late assignments or late pushes to git-teach.lcsr.jhu.edu. The TAs are not authorized to accept late assignments.

Independent Project  Demonstration, Monday-Tuesday May 4-5, 2020

Each team will choose a 30 minute time slot to demonstrate their project to the Instructors, TAs, and other students, faculty and staff.

Independent Project Poster Session, 6-9PM Thursday May 7th

  • Final presentations will be a poster session 6-9PM Thursday May 7th in Hackerman Hall.
  • This poster session is scheduled in the time slot for our class, so it should not conflict with other final exams, per the JHU Registrar’s final exam schedule
  • See below for more details.

Schedule

Week 1:  Course Overview and ROS Basics

Robots of the Week

The EduMIP: Educational Mobile Inverted Pendulum

Topics

  • Course Overview
    • Course Description
    • Prerequisites
    • Assignments
    • Class Project:
      • Video highlights from spring 2019
      • 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

Reading

Tutorials

  • 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

Robots of the Week:

Boston Dynamics Big Dog:

Boston Dynamics Spot Mini:

Topics

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

Reading

Tutorials

Week 3: EduMIPs, Joy, and ROS Node development in C++

Robots of the Week:  Boston Dynamics Spot Mini and Harvest Automation HV-100

Nereid Under-Ice (NUI):

Harvest Automation HV-100:

Topics

  • Assembling the EduMIP mobile robot
  • 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.

Reading

Week 4: URDF and Robot State Publisher

Robots of the Week

The Sentry Autonomous Underwater Vehicle (AUV)

Topics

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

Reading

Tutorials

  • 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 5: Gazebo Intro, SDF, and worlds

Topics

  • 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 gazebosim.org. 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.

Reading

  • 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.

Tutorials

  • Gazebo Version 7.0 Tutorials
    • Note: In this next set of Gazebo tutorials you will use the  command-line “gazebo”, not the ROS gazebo package.
    • Beginner – First-time Gazebo Users
    • Get Started
      • Skip “Install”. Do not install Gazebo, it was installed when your installed the full ROS kinetic desktop.
      • Quick Start: How to run Gazebo with a simple environment.
      • Gazebo Components: This page provides and overview of the basic components in a Gazebo simulation.
      • Gazebo Architecture: Overview of Gazebo’s code structure.
      • Screen Shots
    • Build a Robot
      • Model Structure and Requirements: How Gazebo finds and load models, and requirements for creating a model.
      • Skip this one for now: How to contribute a model.
      • Make a model: Describes how to make models.  Read this one, but there is no exercise to do so quickly move to the next tutorial…
      • Make a mobile robot: How to make model for a 2-wheeled mobile robot.
      • Import Meshes
      • Attach Meshes
      • Add a Sensor to the Robot
      • Make a simple gripper
      • Attach gripper to robot.
    • Build a World
      • Build a world
      • Modifying a world
      • Skip these for now: “Digital Elevation Models”, “Population of models”, and “Building Editor” for now — you can return to them at a later date when and if you need them.  Digital elevation models can be particularly useful in providing realistic simulated terrain for a simulated robot to explore.
    • Friction: How to set friction properties. Be sure to experiment with the more exhaustive friction example linked at the very end of this tutorial. This is the example that I showed in class with sliding blocks. Modify the gravity, friction, and initial position/orientation of the objects to observe different dynamics.
  • Connect to ROS: ROS integration
    • Note: In these ROS Gazebo tutorials you will use the  ROS Gazebo package (“rosrun gazebo_ros gazebo”), not the command-line “gazebo”.
    • Ros Overview
    • Skip this: Which combination of ROS/Gazebo versions to use You can skip this as you will use the default version 7.0.0 that comes with ROS kinetic — see gazebo ROS installation notes above.
    • Installing gazebo_ros_pkgs
      • Note that in this tutorial in addition to apt-get installing some gazebo binary packages you will also clone the KINETIC branch of git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git into your ROS workspace with the command “git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b kinetic-devel”.
    • Using roslaunch: Using roslaunch to start Gazebo, world files and URDF models
    • URDF in Gazebo: Using a URDF in Gazebo
      • Note that you will clone git clone https://github.com/ros-simulation/gazebo_ros_demos.git into your ROS workspace  (~catkin_ws/src) in this tutorial.

Week 6: Gazebo physical simulation, ROS Integration

Preliminary Project Ideas Due 10:30AM Thursday March 5, 2018

Topics

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

Reading

Tutorials

Gazebo screen shot showing the RRBot camera and laser-scanner sensor data. Click for higher resolution image.

.

Gazebo screen shot showing the RRBot camera and laser-scanner sensor data. Click for higher resolution image.
  • Connect to Ros: ROS Integration
    • Gazebo plugins in ROS
      • Note: To visualize the laser in gazebo as shown in the Gazebo figure above and in the tutorial  here you will also need to set the visualize property of the hokuyo laser plugin to true (i.e. “<visualize>true</visualize>”).
      • Note: As mentioned in class, if you are running a PC or VirtualBox without a GPU graphics adapter then the Gazebo laser scanner plugin may not simulate the laser scanner properly, or may crash when you run the launch file with an error message beginning something like [gazebo-1] process has died [pid 3207, exit code 139, cmd /opt/ros/indigo/lib/gazebo_ros/gzserver… – so you will need to modify the rrbot.gazebo sdf file to use non-GPU hokuyo laser plugin as follows:
        • Replace <sensor type=”gpu_ray” name=”head_hokuyo_sensor”> with <sensor type=”ray” name=”head_hokuyo_sensor”>
        • Replace <plugin name=”gazebo_ros_head_hokuyo_controller” filename=”libgazebo_ros_gpu_laser.so”> with <plugin name=”gazebo_ros_head_hokuyo_controller” filename=”libgazebo_ros_laser.so”>
      • Note: To visualize the laser in gazebo as shown in the Gazebo figure on the right of this web page and in the tutorial here you will also need to set the visualize property of the hokuyo laser plugin to true (i.e. “<visualize>true</visualize>”).
    • ROS control Before you do this tutorial be sure that you have the kinetic ros-control packages installed with the command “sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers”. If these packages are not installed on your system you will get error messages like [ERROR] [WallTime: 1395611537.772305] [8.025000] Failed to load joint_state_controller and [ERROR] [WallTime: 1395611538.776561] [9.025000] Failed to load joint1_position_controller.
    • ROS communication with Gazebo
    • ROS Plugins
      • Note: If you previously downloaded the gazebo_ros_demos tutorial package from this tutorial then you do not need to create a new custom package names “gazebo_tutorials” for this tutorial since the “gazebo_tutorials” package is already present in the directory ~/catkin_ws/src/gazebo_ros_demos/custom_plugin_tutorial.
    • Advanced ROS integration

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.

Topics

Reading

Tutorial

Screenshot of Gazebo Turtlebot Simulation with command “roslaunch turtlebot_gazebo turtlebot_world.launch”
rqt_graph of the Gazebo simulation with keyop command input
  • NOTE that the turtlebot tutorials are not all updated to ROS Kinetic, but the tutorials for ROS Jade should work just fine when kinetic-specific tutorials are unavailable.
  • Read 2.1 Turtlebot Developer Habits and and 2.2 Interacting with your Turtlebot at this link: http://wiki.ros.org/Robots/TurtleBot
  • Install the turtlebot packages and the turtlebot simulator Gazebo and Rviz packages.
    • Update your Linux system and ROS packages and Install the turtlebot ROS packages as follows:
      1. Update your PCs Linux system and ROS packages with the commands first sudo apt-get update and then sudo apt-get dist-upgradeTHIS IS IMPORTANT, DO NOT SKIP THIS STEP! If you have not updated recently, the command may pull down several hundreds of MB from the Ubuntu and ROS repositories.
      2. Install the turtlebot ROS packages as described in the Turtlebot Installation Tutorial – item 3.1 Turtlebot Installation: Installing software onto the turtlebot at this link. Do the “Ubuntu Package Install” with this command for the KINETIC version of these packages:
sudo apt-get install ros-kinetic-turtlebot ros-kinetic-turtlebot-apps ros-kinetic-turtlebot-interactions ros-kinetic-turtlebot-simulator ros-kinetic-kobuki-ftdi ros-kinetic-rocon-multimaster ros-kinetic-ar-track-alvar-msgs
  • NOTE 1: After you install the above packages, kill your login shells and start a clean shells so that additional required gazebo environment variables are set.
  • NOTE 2: You DO NOT need to do a source installation
  • NOTE 3: You do not need to run the command rosrun kobuki_ftdi create_udev_rules because your notebook computer will not be physically connected to the kobuki base with a USB cable. The notebook computers that are physically on the turtlebot will be connected to the kbuki base with a USB cable. Your computer will communicate to the turtlebot’s on-board netbook via WiFi.
  • Read about the Turtlebot simulator package for ROS kinetic.
  • Do the “(Section) 6: Simulation” Tutorials for Gazebo (do not do the “Stage” simulator tutorials)
    • Turtlebot Gazebo Bringup Guide: See the simulated turtlebot in Gazebo.When you run the command roslaunch turtlebot_gazebo turtlebot_world.launch if you get the error “Invalid <arg> tag: environment variable ‘TURTLEBOT_GAZEBO_WORLD_FILE’ is not set.”, refer to the NOTE 1 item on installation above.
    • Explore the Gazebo world: Cruise around in the Gazebo world and use RViz to “see” what’s in it.
      • NOTE 4: Do not attempt to install ROS Indigo or Jade packages, we are using ROS kineticSo install only ROS kinetic packages.
      • NOTE 4.1: You may find it convenient to clone these two repositories of turtlebot files into your catkin_ws/src so that you can edit the demo files: https://github.com/turtlebot/turtlebot_interactions.git  and https://github.com/turtlebot/turtlebot_simulator.git  After you clone the repository, be sure to run “catkin build” and then “rospack profile”, and then kill all of your open shells/terminals, and open clean terminals.
      • NOTE 5: Use this command to get keyboard control to drive the robot “roslaunch kobuki_keyop keyop.launch”, it is easier to use (supports arrow keys) than the alternative command “roslaunch turtlebot_teleop keyboard_teleop.launch”
      • NOTE 5.1: The tutorial’s RVIZ initialization file has some errors in the topic names. For example: when displaying the “DepthCloud” visualization in RVIZ, set its “Color Image Topic” to /camera/rgb/image_raw – this will overlay the Kinect camera image on the Kinect’s depth cloud.
    • Make a map and navigate with it: Use the navigation stack to create a map of the Gazebo world and start navigation based on it.
      • NOTE 6: The last time I checked, there was a bug in the ROS Kinetic package turtlebot_gazebo in the package’s launch file gmapping_demo.launch — its full path is /opt/ros/kinetic/share/turtlebot_gazebo/launch/gmapping_demo.launch (what is the bug?). If the gazebo turtlebot simulator crashes continually on launch, you can work around this bug by pulling down a copy of this package source into our own ros catkin workspace with the commands:cd ~/catkin_ws/src (varies depending the name and location of your catkin workspace).
        • git clone https://github.com/turtlebot/turtlebot_simulator
        • cd ..
        • catkin_make
        • source devel/setup.bash
        • rospack profile
        • Check that you have overlaid this package with your local copy. Now when you give the command roscd turtlebot_gazebo your default direcectory should be set to ~/catkin_ws/src/turtlebot_simulator/turtlebot_gazebo.
      • To command the turtlebot motion from the keyboard, this node allows you to use the arrow-keys (up, down, left, right): roslaunch kobuki_keyop safe_keyop.launch
      • Save your map to files with your name as part of the filename – for example I might use the command rosrun map_server map_saver -f map_by_me to generate the map occupancy grid data file map_by_me.pgm and its associated meta-data file map_by_me.yaml.
        • Examine the contents of the .pgm map file with an image viewer such as gimp.
        • Examine the contents of the .yaml metadata map with a text editor or more.
      • Note 7: To run the turtlebot AMCL navigation demo, you need to specify the full path name of the .yaml map file, e.g. roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/sleonard/my_first_map.yaml
      • NOTE 8: Under ROS kinetic the turtlebot AMCL mapping demo seems to ahve some wonky parameters that cause the robot to rotate (twirl) considerably when given a 2-D navigation goal. My workaround was to run rqt_reconfigure (see below for command) and tune some parameters:
        • I set the node move_base parameter “recovery_behavior_enabled” to false (unchecked).
        • I set the node move_base parameter “clearing_rotation_allowed” to false (unchecked).
        • I set the node move_base navigation parameter max_rot_vel s to 1.0 (was 5).
        • Note that setting these parameters with rqt_reconfigure is ephemeral – the parameters return to the default values specified in the AMCL package then the package is re-launched.
      • Be sure to
        • List and examine the nodes, topics, service
        • Echo some of the published topics
        • Run rqt_graph to visualize the topic data paths
        • Run rqt_reconfigure with the command rosrun rqt_reconfigure rqt_reconfigure to see some of the configuration parameters of packages that you are running.
Turtlebot Gazebo Simulation (left) and Gmapping SPAM mapping visualization in RVIZ (right).
rqt_graph of Turtlebot Gazebo Simulation and Gmapping SPAM mapping visualization.
Turtlebot Gazebo Simulation (left) and Adaptive Monte-Carlo Localization (AMCL) with Move-Base 2-D motion planning visualization in RVIZ (right).
Turtlebot Gazebo Simulation and Adaptive Monte-Carlo Localization (AMCL) with Move-Base 2-D motion planning.
rqt_reconfigure showing some AMCL parameters with dynamic_reconfigure.
rqt_reconfigure showing some move_base and DWAPlannerROS parameters with dynamic_reconfigure.

Week 8: Independent Project, OROCOS KDL

Topics

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

Reading

Assignments to do this week

Plan your independent class project and form your team

Here are the project rules:

  • Form a project team of no more than 3-4 members. You can work independently if you prefer.
  • Formulate a project that
    • Performs at least two specific tasks
    • Use Gazebo
    • Use sensors
    • Implement plugins (Gazebo sensor, control, MoveIt!, Rviz)
    • One of the tasks must be performed autonomously or semi-autonimously (i.e. the not just pure teleopertion)
    • Your project MUST include several original ROS nodes that you programmed by you from scratch.
  • Review your preliminary project formulation with the Instructor during regular office hours and after classes this week. Ask them questions.
  • No hardware.
  • Conduct tests of any critical required existing ROS packages.
  • IMPORTANT NOTE:These rules can be waived with the permission of the instructor if you have a good rationale for doing something different.

Assignment

  • Project Proposal – create A SINGLE PDF description of your proposed project and submit it to the Instructor and TAs.
  • ONE of your team members should create a GIT repository entitled 530_707_Independent_Project and share it with the team members  with developer access.
    • Create a text file containing the name of your project and he names of he team members
    • Create a directory entitled “reports
    • Commit your project proposal to the repository with the title Project_Proposal.pdf
  • Email the Instructor and TAs to notify them that  “530.707 Proposal for Project YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.
  • Submit a single project proposal document for each project team.
  • Your proposal should include
    • Project Title – give your project a NAME
    • Project Author(s) (i.e. team members),
    • Date
    • Description of proposed project. What does it do? Describe! How does a user interact with it?
      1. Minimum deliverable
      2. Expected deliverable
      3. Maximum deliverable
    • Software
      • List and description of the NEW ros packages you will program from scratch to accomplish your project.
      • List of the major existing ROS packages you will utilize
      • List what testing you have done on these existing ROS packages.
    • Hardware and infrastructure
      • List and description of any new or additional robots, hardware, and infrastructure needed to implement your project.
      • List of existing and robots, hardware, infrastructure needed to implement your project.
      • Describe availability of all required robots, hardware, and infrastructure.
      • List what testing you have done on existing available hardware.
      • Include a detailed list of all new robots, hardware, or insfrastructure required to be purchased or borrowed, including quantity, description, model number, source/vendor, unit cost, total cost, etc.
    • Project location of operation and testing. Describe in detail where you will operate and test your project. Be specific – you must provide building name, room numbers, specific hallways (Building and floor). Candidates include the Robotics Teaching Lab 170 Wyman Park Building, and other hallways and rooms and hallways in the Wyman Park Building and Hackerman Hall. Some projects will be operated outside on campus – you must specify the specific locations on campus. Be specific!
    • Project Advisors:
      • Required: Course Project Advisor: Please contact them in advance to ask if they will serve. You must schedule a standing meeting to meet with them every week.
        • Name the advisor (you must have asked them first!).
        • What is the day and time of your standing weekly meeting.
      • Optional: Outside Advisor – if you have additional advisors for your project.
    • Safety Plan
      • Are there any safety risks?
      • If so, can they be managed and/or mitigated to an acceptable level fo safety?
      • If so, what is the plan for risk management and/or mitigation?
    • References – list of any references cited in your text
    • Project Timeline: For each week, give the hardware and software development and testing goals for the week.
      1. Week 1 hardware and software development and testing goals.
      2. Week 2 hardware and software development and testing goals.
      3. Week 3 hardware and software development and testing goals.
      4. Week 4 hardware and software development and testing goals.
      5. Week 5 hardware and software development and testing goals. Your goal should be to have your project completed by the end of Week 5 – the last week of classes. This should include your project poster for the class poster session, and also your project report.
  • Your submitted proposal will be reviewed by the Instructor and TAs, and you will be notified of the result. It will either be “approved” or “not approved” – if “not approved” you will be asked to revise and resubmit the proposal.

Week 9: OROCOS BFL and Project Implementation

Topics

Reading

Assignment

  • Follow the outline from the first weekly report, above, to prepare your weekly report.
  • In the directory entitled “reports” of your project repository, commit your project report  with the title 02_Project_Weekly_Report_2019_04_10.pdf
  • Email the Instructor and TAs to notify them that  “530.707 Project Weekly Report for YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.

Week 10: OROCOS RTT and Project Implementation

Topics

Assignment

  • Follow the outline from the first weekly report, above, to prepare your weekly report.
  • In the directory entitled “reports” of your project repository, commit your project report  with the title 03_Project_Weekly_Report_2019_04_10.pdf
  • Email the Instructor and TAs to notify them that  “530.707 Project Weekly Report for YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.

Week 11: Project Implementation and Testing

  • Follow the outline from the first weekly report, above, to prepare your weekly report.
  • In the directory entitled “reports” of your project repository, commit your project report  with the title 04_Project_Weekly_Report_2019_04_17.pdf
  • Email the Instructor and TAs to notify them that  “530.707 Project Weekly Report for YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.

Week 12: Project Implementation and Testing

  • Follow the outline from the first weekly report, above, to prepare your weekly report.
  • In the directory entitled “reports” of your project repository, commit your project report  with the title 05_Project_Weekly_Report_2019_04_24.pdf
  • Email the Instructor and TAs to notify them that  “530.707 Project Weekly Report for YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.

Week 13: Project Implementation and Testing

  • Follow the outline from the first weekly report, above, to prepare your weekly report.
  • In the directory entitled “reports” of your project repository, commit your project report  with the title 06_Project_Weekly_Report_2019_05_01.pdf
  • Email the Instructor and TAs to notify them that  “530.707 Project Weekly Report for YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.

Independent Project  Demonstration, Monday May 4 or Tuesday May 7

Each team will choose a 20 minute time slot to demonstrate their project to the Instructors, TAs, and other students, faculty, staff, and possibly some local press.

Independent Project Poster Session, 6-9PM Thursday May 7)

  • Final presentations will be in Hackerman Hall 2-4PM Tuesday May 14, 2019.
  • This poster session is scheduled in the time slot for our class final exam, so it should not conflict with other final exams, per the JHU Registrar’s final exam schedule: https://studentaffairs.jhu.edu/registrar/wp-content/uploads/sites/23/2019/02/Spring-2019-Final-Exam-Schedule-Final.pdf
  • I posted a poster template for a 48” (wide) x 36” (tall) poster here  530-707-Dropbox  in the file named Robot_Systems_Programming_Poster_Template_Rev_01.pptx
  • We will provide 48”x36” foam-core boards and poster-stands.
  • You need to print your own poster.
  • The printers are both loaded with 42” wide HP Heavyweight Coated Paper, so you can print your poster sideways to save paper.
  • Do not wait until the last day to print your poster!
  • If you can demo your project at the poster session, please do so. If not, showing a video of your project in action is desirable.
  • Please commit the .PPT and PDF of your poster to the “reports” directory of your project git repository, with file names like these:06_Project_Poster_Your_Project_Team_Name.pdf
    06_Project_Poster_Your_Project_Team_Name.pptfor example   06_Project_Poster_UR5_Plays_Jenga.pdf
    06_Project_Poster_UR5_Plays_Jenga.ppt

Project Videos for upload to the Course YouTube Channel!

PROJECT VIDEOS: Not required, but greatly appreciated. If you made a video and would like me to load your video to the class youtube channel (https://www.youtube.com/channel/UC_HYa5JUr2yKZAM0rYtAiFQ) , please commit the video file to your project git repo in the “reports” directly with a file name like:

530707_Project_Video_YOUR PROJECT_NAME.mp3

for example

530707_Project_Video_EduMIP_SLAM_and_UR5_Transporting.mp3
or
530707_Project_Video_EduMIP_SLAM_and_UR5_Transporting.mov

Independent Project Final report is due by end of exam period: Thursday May 16, 2019

Here is the outline:

  • Your project report should include
    • Project Title, Author(s) (i.e. team members), Date
    • A Section on Description of proposed project goals. Be detailed. Use figures.
    • A Section on Software
      • List and description of the new ros packages you implemented to accomplish your project. List the primary authors. . Include git repository URL for each package.
      • List of the major existing ROS packages you utilized
      • Use Figures as needed.
    • A Section on Hardware and infrastructure
      • List and description of any new or additional hardware and infrastructure you needed to implement your project.
      • List of existing and infrastructure you needed to implement your project.
      • Figures/Photos as needed.
    • A Section on contributions of each team member. For EACH team member by name have a subsection that details for that team member the following:
      • What was the individual team member’s principal contribution to the project?
      • What does individual team member know now that she/he wishes they knew at the start of the project?
      • What are the individual team member’s biggest lessons learned that will help them on future projects?
    • A section with sample Data Products (if any) from the project
    • A section with a link to brief online video of your project in action (desired but not required).
    • Suggestions for future projects
    • References – list of any references cited in your text
  • Please commit your project final report to the same directory by May 176 2019, with the names07_Project_Final_Report_Your_Project_Team_Name.pdf
    07_Project_Final_Report_Your_Project_Team_Name.pptfor example   07_Project_Final_Report_UR5_Plays_Jenga.pdf
    07_Project_Final_Report_Plays_Jenga.ppt Please email me when you have uploaded your final report with “530.707 Project Final Report for YOUR PROJECT NAME by NAMES OF ALL TEAM MEMBERS” in email subject line.

HOW TO ORDER COMPONENTS FOR YOUR PROJECT

Some Tips and Notes on Projects and Programming the EduMIP in ROS

Istalling ROS Packages on the EduMIP:

The ROS installation /op/ros/kinetic on your EduMIP was compiled from source on the EduMIP, it was NOT installed with “apt-get install ros-kinetic-desktop-full”. If you want to install additional ROS packages on your EduMIP, we suggest that you download the KINETIC branch of the package souce code into catkin_ws/src and compile it with “catkin_make”

  • So, for example, if I want to install the ROS “serial” package on my edumip, I would need to clone a copy of the source and compile it:
  • Now your EduMIP should use the serial package from your workspace.
  • On my PC, in contrast, I can use apt-get to install this binary package with the command “sudo apt-get install ros-kinetic-serial”

ROS Can’t Find my ROS Package

If your ROS environment does not seem to recognize that you have new packages in your catkin_ws/src, try updating your rospack profile with the command “rospack profile”, and update your rosdep cache with the command “rosdep update”.

Compiling and Linking to the Robtoics Cape “C” Libraries

The robotics cape library and associated header files are already installed on your EduMIP. The link library is /usr/lib/libroboticscape.so, and the two top-level header files are rc_usefulincludes.h and roboticscape.h.

You can refer to the edumip_balance_ros project (https://git.lcsr.jhu.edu/lwhitco1/edumip_balance_ros) to see how to use the robotics cape C header files and C link library with your C++ ROS Node.

See edumip_balance_ros/src/edumip_balance_ros.cpp to see how to include the C header files in a C++ program with the extern “C” directive.

See edumip_balance_ros/CMakeLists.txt to see how to link your program to the roboticscape C library.

Edumip_balance_ros Package

EduMIP Horizontal Configuration

Several teams propose to employ the EduMIP in a horizontal configuration with a caster wheel. To do this you will need to replace the “edumip_balance_ros” project with your own new code to command the wheel servos and to read and publish the wheel encoders. As I reviewed in class yesterday, one possible package you could use is the ROS differential_drive package (http://wiki.ros.org/differential_drive). To use the differential_drive package you will need to write a new C++ node for the edumip that (a) Reads the wheel encoders and publishes them on topics and (b) Subscribes to motor command topics and commands effort to the wheel motors.

Interfacing to Serial Port Devices

To interface your C++ code to a serial device such as the USB ultrasonic sensor demonstrated in class, you will need to be able to open, read, and write to the serial ports. A good package for this is the ROS serial package (http://wiki.ros.org/serial). You can clone a copy of the src into your ROS workspace with the command “git clone https://github.com/wjwwood/serial.git” and compile it with “catkin_make”. The “examples” directory has a somewhat complex example of serial port usage. A simpler example is available here: https://github.com/garyservin/serial-example

Running catkin_make from within emacs

Add something like the following to your ~/.emacs initialization file. This example binds the compile command to “ESC-x | ” :

; bind C-x | to compile
(global-set-key "\C-x|" 'compile)

; override default compile command
(setq compile-command "cd /home/sleonard/ros_catkin_ws; catkin_make ")