MuSHR Lab Information

Overview

Please read this entire guide carefully before coming to the MuSHR Lab (CSE2 128) to conduct experiments. We have prepared 5 MuSHR cars (v3) and 7 Ubuntu 20.04 workstations.

Questions or issues? Contact Shane Lyu.

Location

CSE2 128 is located in the first floor of the Gates Center. Enter the undergraduate commons from the lobby, and walk straight to the windows at the end of the hallway.

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. CSE2 128 requires card-key access. Don’t lock yourself out!

  2. Wear a mask at all times.

  3. Do not move the office drawers in the middle of the room. These drawers are part of the map, which you will use for localization.

  4. Start charging batteries (2 per car) with chargers located next to your workstation. 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 connect them to their respective chargers. 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. Remove your repository from the car. Push all of your changes and plots to GitLab, or you will lose them. Please don’t modify any other files outside of your source files.

  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 are in charging mode (should flash green to indicate not-charging), 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 2 batteries: one for the servo motor and another for the on-board Jetson computer. The motor battery has red-circular connectors and the Jetson battery has white clip-connectors(or red-circular connectors). The batteries can be found on the metal shelf in the middle of the room. Press the blue button on the charger to start/stop charging. Remember to only charge batteries when you are physically present in the lab.

    (Left) Not charging: flashing green light vs. (Right) Charging: solid red light

    (Left) Not charging: flashing green light vs. (Right) Charging: solid red light

  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 start blinking inside the front of the car. The motor battery can be placed in the holder at the bottom of the car, and the Jetson battery can be placed inside the 3D-printed shell. Ensure that the cables and connectors won’t get tangled with the wheels once they start spinning.

  3. Each car is connected to the “University of Washington” WiFi and has a static IP address. Check here to find the username and IP address for your car. Then, from your workstation, SSH into the car ssh <username>@<robot_ip_addr> -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. To set up the network connection, open a separate terminal from the workstation and set export ROS_MASTER_URI=http://<robot_ip_addr>: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. To teleoperate the robot, press the PS Button on the PS controller. Once the controller is connected, the LED should stop flashing white. Inside the SSH session, run mushr_noetic and then roslaunch mushr_base teleop.launch. If no errors are thrown (everything goes right), you should be able accelerate and steer the car with the joystick.

    PS Joystick Controls

    PS Joystick Controls

    Note: For every new terminal you SSH to the car, you will have to run mushr_noetic before you run any other commands! We also recommend that you create a tmux session for each command, as you might want to run multiple commands in parallel.

  6. In your local 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

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 robot or prl_robot user account with the password prl_robot. 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 UW Wifi. Connect to the HDMI port and follow the network setup instructions here. Make sure the robot is on the “University of Washington” WiFi. Check the IP address with ifconfig. You should be able to ping the robot ping <robot_ip_addr> from any computer on the “University of Washington” 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.

RealSense Camera Initialization Error

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

3. ROS and Catkin Workspaces

All cars workstations have ROS Melodic 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 identical to the VMs used for the projects. Dependencies are pre-compiled inside ~/dependencies_ws and your repos should be placed inside ~/mushr_ws on the car (you should only run rviz or rostopic list on workstations):

$ # SSH to the car
$ ssh <username>@<robot_ip_addr>
$ # Attach to the Docker node
$ source ~/.bashrc
$ mushr_noetic
$ # Activate Dependencies Workspace
$ source ~/dependencies_ws/devel/setup.bash 
$ # Clone your repo
$ cd ~/mushr_ws/src
$ git clone git@gitlab.cs.washington.edu:cse478/22wi/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

Before you leave, you should run sudo bash ~/.clean_script to erase your code on the car and save space for the next person. Push all of your changes and plots (to GitLab or somewhere else), or you will lose them. If the user before you forgot to log out, run sudo bash ~/.clean_script to execute the cleaning script.

References

Workstation Reference

The workstations have Ubuntu 20.04, ROS Melodic, and other MuSHR dependencies pre-installed. You can log into the workstations with the username cse478. You will receive the password in your email; do not share and do not change them!

MuSHR Car Reference

MuSHR cars: Car 24, Car 31, Car 29, Car 27, and Car 35

MuSHR cars: Car 24, Car 31, Car 29, Car 27, and Car 35

  • Car 24 - Blue, username : prl_robot, IP address: 172.16.77.24
  • Car 31 - Green, username : prl_robot, IP address: 172.16.77.31
  • Car 29 - Orange, username : prl_robot, IP address: 172.16.77.29
  • Car 27 - Gray, username : robot, IP address: 172.16.77.27
  • Car 35 - Pink, username : robot, IP address: 172.16.77.35

You can unplug the HDMI-DVI cables, keyboards, and mice from the workstations if you need to connect directly to a MuSHR car’s on-board Jetson computer.

Tutorial: Building a Map with Hector Mapping

  1. Set up teleoperation by following Section 2.

  2. Open a new terminal(or tmux session), SSH to the car, and launch mushr_noetic. Then run rosrun hector_mapping hector_mapping _base_frame:=car/base_link _odom_frame:=/car/base_link _scan_topic:=/car/scan

  3. In the local terminal (with export ROS_MASTER_URI=http://<robot_ip_addr>:11311 set), run rviz and add the live “Map” topic to the visualizer. You should see a gray and black map.

  4. Drive the car slowly around the room. Avoid making jerky accelerations or turns.

  5. Once you are satisfied with the map, you can save it with cd <save_path> & rosrun map_server map_saver -f 'cse2_128'.