Public | Automated Build

Last pushed: 2 hours ago
Short Description
Code used to run code on the rover and basestation.
Full Description

Superproject

Contains the CMR production code.

Setup

Requirements

  • Linux or OS X
    • While Docker in theory runs on Windows, no one has tried it.
  • Python 3
  • git

Setup

  1. Install the necessary software:

    • OS X: Install Docker for Mac. Then: brew install python3 git
    • Ubuntu:
      sudo apt-get update
      sudo apt-get install -y python3 git curl
      sudo apt-get remove docker docker-engine docker.io
      curl -fsSL get.docker.com -o get-docker.sh
      sudo sh get-docker.sh
      sudo usermod -aG docker $(id -un)
      
    • Arch: sudo pacman -S python git docker
    • Gentoo: sudo emerge -a python git docker
  2. Clone the repository to CMR_ROOT (a directory of your choosing):

    cd "$CMR_ROOT" && git clone git@github.com:CornellMarsRover/Superproject.git
    
  3. Configure your environment:

    echo 'eval "$($CMR_ROOT/Superproject/scripts/cmr eval)"' >> ~/.bashrc
    source ~/.bashrc
    

    You may have to use ~/.bash_profile on a Mac.

  4. You may have to restart your computer or log out and back after this in order for Docker to work
    properly.

Network setup

When connecting to the NUC, you need to have an active Ethernet connection with
the following settings:

  • IPv4 address: 192.168.17.15 (specified in user_conf.py as HOST_IP)
  • Netmask: 255.255.0.0

Advanced setup

The scripts in scripts rely on various variables in order to function properly. Local changes can be made in scripts/config/user_conf.py. Any changes to that file will overwrite the default values.

Workflow

Writing Code

You can modify code directly within Superproject, and any changes will propagate
to the Docker image. This is possible due to
Docker volumes.

Building Code

Just run:

cmr make

You can run cmr make from anywhere; it figures out whether Docker is already
running and whether you need to run inside Docker.

Running Code

You should run code within a Docker container, since this container has the
software configuration that will be used in production. Run the command
cmr shell to get inside the Docker image and start running commands (e.g.
rostopic list). cmr shell automatically spawns a container running
roscore, so you don't need to run roscore yourself.

To run the actual rover code, see controls/src/cmr_docs/MANUAL.md.

For help on how to use cmr shell, run cmr shell -h. The cmr utility also
has lots of other handy subcommands. Run cmr -h for a complete list.

Docker Pull Command
Owner
cornellmarsrover
Source Repository