MuSHR Lab Information

Overview

Please read this entire guide carefully before coming to the MuSHR Lab (CSE 002) to conduct experiments.

Questions or issues? Contact course staff on Ed or email Sidharth Talia.

Location

CSE 002 is located in the basement floor of the Allen Center. When you enter into the Allen lobby, take the elevator down one floor, then take a left out of the elevators. You will need your Husky card to access 002.

1. Lab Usage and Safety

The lab will be open throughout the week.

After entering the lab

  1. Remember to keep your Husky Card with you at all times. CSE 002 requires card-key access. Don’t lock yourself out!

  2. Do not move the furniture in the middle of the room. This is a part of the map, which you will use for localization.

  3. Start charging LiPo battery with chargers located near your workstations. Only charge batteries when you are physically present in the lab. Do not leave them charging overnight.

Leaving the lab

  1. Unplug the batteries from your MuSHR car and return them to their table. Put the car back on the table.

  2. Don’t leave your belongings. Clean up your workspace (any cables, tools, etc.) and return anything you took to where you found them.

  3. Push your changes to GitLab. You can leave your code on the car, but please don’t change any files outside of ~/catkin_ws.

  4. If you are the last person to leave the lab: do a quick check around the room to make sure that none of the chargers have batteries attached, and turn off the lights.

2. MuSHR Car Experiments

Official Guides: MuSHR Quickstart | Build Instructions | System Overview | Teleoperation

The following is a supplementary guide to getting started with MuSHR cars in the lab. Reading the official guides before coming in will save you valuable debugging time.

  1. Each MuSHR car requires 1 LiPo battery to power the servo motor and the on-board Jetson computer. Please review LiPo-battery-guide for information about how to use/charge the LiPo batteries. Remember to only charge batteries when you are physically present in the lab.

    Plug the battery into the upper port, and wait for the screen shown on the right to show up.

    Plug the battery into the upper port, and wait for the screen shown on the right to show up.

  2. After connecting the batteries, the on-board Jetson computer should boot up within a few seconds (2 mins max) and a green light should turn on inside the case of the car. The battery should be placed in the holder at the bottom of the car. Ensure that the cables and connectors won’t get tangled with the wheels once they start spinning.

  3. [WORKSTATION] Each car is connected to the “CSE-Local” WiFi and has a static IP address. Check here to find the hostname, username and password for your car. Then, from your workstation, SSH into the car ssh <username>@<robot_hostname> -X with the password prl_robot. Do not change the password, username, or hostname of the robot, otherwise the car cannot be used by the next person.

  4. [WORKSTATION] To set up the network connection, open a separate terminal from the workstation and set export ROS_MASTER_URI=http://<robot_hostname>:11311. This connects your workstation ROS session to the car (using the car as the ROS Master).

    Note: For every new terminal you open on your workstation, remember to set the ROS_MASTER_URI! Otherwise, your workstation will look for a local ROS Master.

  5. [RACECAR] SP25 ONLY: We have updated the lidar software and changed some VESC parameters. Please update the code by running the following lines.

    $ # Pull new ydlidar updates
    $ cd ~/catkin_ws/src/mushr/mushr_hardware/ydlidar/
    $ git pull
    $ # Pull new vesc changes
    $ cd ~/catkin_ws/src/mushr/mushr_base/vesc
    $ git pull
    $ # Rebuild
    $ mushr_noetic
    $ cd ~/catkin_ws/
    $ catkin clean
    $ catkin build
  6. [RACECAR] To teleoperate the robot, press the PS Button on the PS controller. Once the controller is connected, the LED should stop flashing white and turn solid blue. Inside the SSH session, run the following commands:

    $ roslaunch mushr_base teleop.launch

    If no errors are thrown and everything goes as expected, you should be able to accelerate and steer the car with the joystick.

    As a safety feature, teleoperation will only work while you hold down the left bumper button (L1).

    PS Joystick Controls

    PS Joystick Controls

    Note: You’ll need to work with several terminal sessions on the car itself while running your projects.
    DO NOT run mushr_noetic in multiple terminals
    There are two ways to use the same docker container with multiple sessions
    1. In a new window,
      Run dbash - This is an alias we have configured to resume the started docker container
    2. In the same window (which you ran mushr_noetic),
      Create a tmux session for each command
  7. [WORKSTATION] In your workstation, terminal (where you set ROS_MASTER_URI), you should be able to list the current ROS topics being published by the car with rostopic list. You should be able to see all the published sensor feeds from the camera, LIDAR, etc.

    Start rviz, click the “Add” button on the bottom left corner, select “By Topic”, and add a “Laser” or “Camera” topic to visualize.

Troubleshooting

Official Debugging Guides: Workflow & Troubleshooting

(Note: please use robot_hostname instead of robot_ip_addr)

As in most cases with physical robots, things will go wrong. Be patient with the debugging. Read the Workflow & Troubleshooting tutorial for additional tips.

In general, if something isn’t working, try connecting directly to the on-board Jetson computer with an HDMI cable. Unplug the RealSense and LIDAR USB cables (blue and gray wires) and connect a keyboard and mouse. (There are extra HDMI-DVI cables, keyboards, and mice by the car storage table.) The Jetson also runs Ubuntu; you can log in to the mushr user account with the password prl_robot.

Most of the workstations in the lab are all-in-one PCs and can’t act as a monitor for the Jetson. However, we’ve left one standard tower PC workstation (artemis) unassigned to any group to be used for this purpose. You can unplug the mouse, keyboard, and display port cable from the back of the PC, then plug those into the car and run any commands needed

Here are some common issues:

Jetson won’t boot up or no green light You probably need to charge the batteries. Also, sometimes the Jetson takes a while to boot up. Connect to the HDMI port to see what’s going on.
Can’t SSH into the car

The car probably disconnected from the CSE Wifi. Connect to the HDMI port and follow the network setup instructions here. Make sure the robot is on the “CSE-Local” WiFi. Check the IP address with ifconfig. You should be able to ping the robot ping <robot_hostname> from any computer on the “University of Washington” or “eduroam” Network, including your workstation.

Can’t start RViz, run rostopic list, or launch teleop.launch

This probably means something is wrong with the network connection. Check that ROS_IP and ROS_MASTER_URI are set correctly. See this for more info.

Teleoperation/Joystick not working

Check that the PS Controller is charged. You can charge it with a mini-USB cable from the steel rack. If the controller is blinking white, then something went wrong with the Bluetooth connection. Connect to the Jetson’s HDMI port and follow the Bluetooth setup instructions in Step 14 of the Hardware Guide.

VESC Controller Error

VESC is the servo motor controller. This means the motor battery needs to be charged or isn’t connected properly. Ask a staff member for help if you believe it is not connected properly.

RealSense Camera Initialization Error

Check that the camera cable (blue USB) is plugged in. (That said, your projects won’t use the RealSense camera at all.)

3. ROS and Catkin Workspaces

All cars workstations have ROS Noetic and MuSHR dependencies pre-installed. Unlike in your virtual machine, all dependencies are installed locally so you can directly interface with hardware and network devices from the workstation.

This also means you can easily brick the system with careless sudo apt-get install or sudo apt-get purge commands. So be very careful when installing additional dependencies and copy-pasting random code from StackOverflow. Be particularly skeptical of solutions that require reinstalling NVIDIA drivers, etc.

The Catkin workspaces on the cars and workstations are slightly different from the VMs used for the projects. Dependencies and your code will live inside ~/catkin_ws on the car (you should only run RViz or rostopic list on workstations):

$ # SSH to the car
$ ssh <username>@<robot_hostname>
$ # Launch Docker container
$ mushr_noetic
$ # Clone your repo
$ cd ~/catkin_ws/src
$ git clone https://gitlab.cs.washington.edu/cse478/25sp/your_repo_name.git mushr478
$ # Build your workspace
$ cd ~/catkin_ws
$ catkin build

Since each car is assigned to one group, you can leave your code on the cars between sessions in the lab. However, cars can easily break and you might lose access to your code at anytime, so be sure to push your code to GitLab often.

Congrats! You are now ready for Lab 1! 🎉




References

Workstation Reference

The workstations are running Ubuntu 20.04. You can log into the workstations with the username capstone. The password is located on the Ed board and written on a whiteboard in the lab; do not share and do not change this!

Most commands will be run on the car, but the car won’t be able to run RViz smoothly. RViz and ROS are already installed on the workstations, but you will need to set up a workspace with your code:

$ # Activate the dependencies workspace underlay
$ source ~/dependencies_ws/devel/setup.bash
$ # Create workspace if it's not already there
$ mkdir -p ~/mushr_ws/src && cd ~/mushr_ws/src
$ # Clone your repo
$ git clone https://gitlab.cs.washington.edu/cse478/25sp/your_repo_name.git mushr478
$ # Build your workspace
$ cd ~/mushr_ws
$ catkin build
$ # Don't forget to source your workspace in every terminal you open!
$ source ~/mushr_ws/devel/setup.bash

MuSHR Car Reference

There are 15 cars set up in the lab area for your use. Your group will be assigned one car to work with. You should only use the car that you have been assigned.

Each car should automatically connect to the University of Washington wifi with a static IP address.

  • Hostname: mushr-<TAG>.cs.washington.edu
  • Username: mushr
  • Password: prl_robot

The <TAG> is a label on top of the car.

You can unplug the HDMI cables, keyboards, and mice from the workstations if you need to connect directly to a MuSHR car’s on-board Jetson computer. If you do, please restore the equipment as they were before you leave the lab.

Setting Jetson Performance

When running computationally intensive tasks (especially for your final project), you may need to maximize the performance of the Jetson computer onboard the MuSHR car:

  1. To set the power mode to maximum performance (MAXN): $ sudo nvpmodel -m 0

Note: Running at maximum performance will drain the battery faster, so only use the following during your final project.

2. To maximize clock speeds and disable throttling:

$ sudo jetson_clocks

These commands will ensure your Jetson is running at maximum performance capability during experiments, which is particularly helpful for computationally demanding algorithms like particle filters or motion planning.