Meet the Turlebots Lab

Meet the Turtlebots

Turtlebot

The goal of today’s activity to gain experience working with the Turtlebots. Some of us might be intimidated by robotic, as shown here in this video of our dog Penny’s reaction. These are the main robots that we will be using in CS 354.

This lab will be worked in groups of 4. There are two parts to today’s lab and you can complete them in either order. At the end of each part, have the instructor review your work so that you will get credit for it.

Part A – Working with the Real Robot

  1. Obtain a laptop from the cabinet. This will be your laptop for the class. Login to the laptop using your EID and password.

  2. Obtain a robot from the cabinet. Note that the robots are numbered “robot1”, “robot2” etc. Pay attention to the number associated with your robot. Plug in the battery and switch on the robot. Wait around 30 seconds for the boot process to complete (you will hear a series of ascending notes when the robot is ready).

  3. Open a terminal on your laptop and enter the following command:

    ros2 launch turtlebot3_bringup image_transport.launch.py
    
  4. Open a second terminal (or a new tab in your existing terminal) and enter the following command:

    ros2 launch turtlebot3_bringup rviz2.launch.py
    

    At this point you should see a visualization of the robot sensor data. Take a minute to experiment with activating and deactivating the different displays in the rviz2 windows.

  5. Open a third terminal and enter the following command:

    ros2 run turtlebot3_teleop teleop_keyboard 
    

    You should now be able to drive the robot using keyboard input. Spend some time driving the robot and observing the sensor data.

  6. Close rviz by pressing CTRL-C in the terminal where you launched it.

  7. Now start rviz in an un-configured state by running the following command in that terminal:

    ros2 run rviz2 rviz2 
    

    Use the add button in the Displays panel to enable some visualization plugins so that you can, once again, see the sensor data from the robot.

  8. Get my attention and show me that you have this working during class.

Part B - Simulation

  1. Close ALL terminal windows you have opened on the laptop.

  2. Note the number associated with your laptop by looking at the sticker on the lid. For example, if you have laptop “cslp48”, your number is 48.

  3. Double click the script ros2_jmu_setup.sh , which should be located on the Desktop of your laptop. When prompted for the ROS_DOMAIN_ID, enter the number noted above. You don’t need to complete the git configuration.

  4. Open a terminal on your laptop and enter the following command:

    ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
    

    This starts Gazebo, which is a program that supports simulating some ROS activities without a physical robot.

  5. Open a second terminal (or a new tab in your existing terminal) and enter the following command:

    ros2 launch turtlebot3_bringup rviz2.launch.py
    

    At this point you should see a visualization of the robot sensor data. Take a minute to experiment with activating and deactivating the different displays in the rviz2 windows.

  6. Open a third terminal and enter the following command:

    ros2 run turtlebot3_teleop teleop_keyboard 
    

    You should now be able to drive the robot using keyboard input. Spend some time driving the robot and observing the sensor data.

  7. Close rviz by pressing CTRL-C in the terminal where you launched it.

  8. Now start rviz in an un-configured state by running the following command in that terminal:

    ros2 run rviz2 rviz2 
    

    Use the add button in the Displays panel to enable some visualization plugins so that you can, once again, see the sensor data from the robot

Submitting

There is nothing to submit for today, your grade is based on attendance and completing the task. Get my attention after you complete each part and I will notate that your group completed the task.

Acknowledgements

This assignment was originally developed by Nathan Sprague.

Last modified August 22, 2024: Calendar update (1e4ee0f)