MRC/Using Pico

From Control Systems Technology Group
Jump to navigation Jump to search

Starting Pico

To start Pico or Taco please follow the following steps:

  1. Power on the robot
    • For Pico, the on-off switch is on the bottom, next to the emergency button. This also starts the on-board computer
    • For Taco, the on-off switch is on the outer edge of the base. Also start the laptop, if it is not already on (you don't need to log in).
  2. From here on, you should work on the operator laptop. Open a terminal and type
    ssh<robot name>
    where <robot name> is either pico or taco, depending on which robot you want to use. Using this command, you login on the robot's computer; the password is again emc. You are now working directly on the robot's computer through the WiFi.
  3. Now that you are in, you can start all the necessary nodes on the robot. These controllers and drivers let your software communicate with the hardware. On the robot (so in the terminal you opened in the previous step) enter
    • For Pico:
    • For Taco:
  4. N.B. leave this terminal open!

Running your software

Pico/Taco is now up and running. To run your own software follow these steps:

  1. Open a new terminal and login to your robot again:
    ssh<robot name>
    with password emc.
  2. Go to your group's folder:
    cd ~/groups/emc<group number>
  3. The rest works the same as on your own PC.
    • The first time, you will have to clone your git project on the robot's computer:
      git clone<group number>/my_project.git shared_project
      Of course with your own group number, project name etc. Just like you did on the PCs of the group members.
    • Any next time you can just navigate to your group's folder and
      git pull
    • Now that your own software is up to date, you can compile it and run it, again just like you would on your own laptop.


When you want to visualize the robot while testing, you can do the following

  1. Open a new terminal
  2. Type
    <robot name>-core
    This makes sure that any software you run in this terminal listens to the ros-master on your robot.
  3. So if you now run our visualization software by entering
    it will subscribe to the topics published on the robot.

Recording data

A simulator simulates a perfect world, so if your software works in the simulator, it is not (at all) guaranteed to work in the real world. But because you only have limited testing time on the robots, it would be nice if you could somehow simulate being in the real world. Luckily, the developers of ROS also ran into this, so they create rosbag. Using rosbag you can record data published by the robot and play it later when you want to test an awesome new feature of your software using real sensor data, or if you just want to inspect the quality of the sensor data, etc.

  1. The first step is again to open a terminal and log in to the robot
ssh<robot name>
  1. Find the topics you would like to record (usually those will be the ones containing data from the LRF and the odometry) by using
rostopic list
  1. You can now use the rosbag tool to record the topics you like:
rosbag record topic_1 topic_2

Topic_1 and topic_2 should of course be changed to the correct topic names, but you can also add more topics to this command. While recording, you should leave this terminal open, and if you think you have enough data, you can stop recording by pressing ctrl+C. If you would like to record all topics (not recommended, as this means recording a lot of unnecessary data), you could use the option -a instead of typing in all of the topic names.

  1. The bag file you just recorded is now in the current directory, so if you enter

you can see it amongst the other files in the current directory. This should be the home directory (if you did not cd to somewhere else). You can now copy this file over the network to your own laptop by opening a new terminal (or just log out of the robot by pressing ctrl+D), navigating to the directory where you want to place your new bag file, and entering

scp emc@<robot_name>:~/<filename> <filename>

What this command does is the following: it securely copies (scp) from the emc account at the robot's computer the file given by the path after the colon and it places it in your current directory with the second file name.

  1. Once copied to your own PC, you can play the bag file using this command
    rosbag play <filename>
    This will publish the topics that were recorded as if you are currently running that experiment.