Skip to content
Jeremy Weed edited this page Sep 14, 2017 · 34 revisions

Robotics @ Maryland Wiki

Welcome to the Robotics @ Maryland Wiki. This wiki should serve as an introduction to most of the things you’ll need to know if you want to learn and contribute to our software system.

If you’re interested in the electrical team, you should click here.

If you’re interested in the mechanical team, you should click [[][here].

Overview

Our robot is powered by a Jetson TX1, running Ubuntu 16.04. We use ROS and program primarily in Python and C++. For our embedded system, we’re currently using a Teensy 3.1 Arduino-compatible board, but we’ve already done extensive development for and might use a TI Tiva C running FreeRTOS.

If you didn’t understand most of that, don’t worry. Most of our members didn’t understand most of that before they joined, either.

Getting Started

If you’re interested in working on our software system, you’ll first need an install of Ubuntu 16.04. There are a couple of ways you can do this. We usually recommend you either:

  • install a virtual machine,like VMWare from TERPware, or VirtualBox. Most of our members have found that VMWare runs a bit better, but a few have found that VMware causes their computer to blue screen on install, or that the version on TERPware doesn’t support the most recent Linux kernels as host.
  • Run Ubuntu natively, replacing or installing it alongside your current operating system. Running it natively will give you a much smoother experience, but you might run into trouble if you screw something up or we make a decision that requires a lot of backend changes.

Whichever you choose, you’ll need an Ubuntu 16.04 image, which you can get here. If you’re new to Linux, make sure to get the ‘desktop’ image instead of ‘server.’

Once you’ve installed Ubuntu and set up an account, you’ll need to configure our repository. If you’re new to git, you might want to go through a tutorial, like this one, or this one. After you’re comfortable with git, you should follow the steps here to set up our git. After that, you’ll need to run the install script install_dependencies.bash located in scripts. This may take a while.

$ bash ./scripts/install_dependencies.bash

Once you’ve run the install script, you should execute catkin_make in the root folder of the repository to compile and build our software. If there are no errors, everything should be installed correctly.

Once you’ve gotten our software to compile, you can start looking through our code and begin to familiarize yourself with some of the libraries we use. Things you may be interested in looking into might be:

If you’re interested in working on the high level software of the robot, we recommend everyone create a basic ROS publisher and subscriber, and then submit the code to us as a pull request. Its a great way to learn the basics of the high level system.

Build System

We use ROS catkin to build our software. If you have everything configured/sourced correctly, you should only need to run:

$ catkin_make

in the top level of the repository to build it. If something goes wrong, you may have forgotten to source a couple of files needed to get everything to compile correctly. Make sure your .bashrc has the variables/sources set up by the install script.

ROS

Our high level software uses the ROS framework to pass messages and information between different components of the system. The system is currently split into three parts: planning, vehicle layer, and controls.

The planning subsystem uses Python and rospy to interface with the vision/controls subsystem to determine where our robot is, and what it wants to do next.

The vehicle layer is our ROS interface between drivers and the rest of the system. It receives values from various hardware and interprets/publishes them to ROS topics for the other subsystems.

The controls subsystem takes the information from the vehicle layer, and uses it to figure out our heading/velocity/acceleration. It also takes the desired movement/position form the planning subsystem, converts it to specific motor/thruster commands, and relays that information to the vehicle layer.

Once you’ve written a ROS node, you’ll need to specify its dependencies and how to build it in the CMakeLists.txt file that should exist a directory above your source file. ROS uses the CMake build system to build nodes, and CMake uses this file to figure out what it should build. If you’re having issues with things not getting build or missing dependencies, this is where you should look first.

How Do I Run It?

To start testing things you’ve written with ROS, or just to make sure everything you just built runs, you’ll need to know how to correctly start our system.

If you want to just manually run a few specific nodes, you should first call roscore to start an instance of the main ROS server on your machine. After that, you can either background the ROS process or open a new terminal and run rosrun $package $node, where $package is your package (like vl_qubo, vision, etc) and $node is an executable you’ve built (like qubo_ahrs_node, vision_node, etc).

The other, and probably easier option, is to use roslaunch. roslaunch takes a .launch XML file, and parses it to run multiple nodes with set parameters. It will also start/kill roscore in the background, so you don’t have to worry about running it first. All of our current launch files exist in src/launch, and can be used to launch various parts of the system, or the entire thing.

Embedded

Clone this wiki locally