User Tools

Site Tools


turtlebot:firstlaunch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
turtlebot:firstlaunch [2015/03/05 20:03] pvelaturtlebot:firstlaunch [2023/09/19 08:46] (current) classes
Line 1: Line 1:
 ====== Turtlebot: First Time Running  ====== ====== Turtlebot: First Time Running  ======
  
-Alright, so it's your first time with the Turtlebot.  Where to being?  The online [[http://http://wiki.ros.org/turtlebot/Tutorials| Turtlebot ROS wiki]] has some tutorials/tips on how to start.  Now, the Turtlebot and Workstations have been configuredso that's no big deal.  You are ready to "Get Started."+Alright, so it's your first time with the Turtlebot.  Where to begin?  The online [[http://http://wiki.ros.org/turtlebot/Tutorials| Turtlebot ROS wiki]] has some tutorials/tips on how to start.  Once they've been skimmedyou are ready to "Get Started."
  
-Most likely, if you are new to the Turtlebot, then you are new to ROS (Robot Operating System).  ROS is a bunch of written code that runs on top of the standard operating system with lots of functionalities and operations like those of an operating system but tailored to Robotics.  Most of the time, you will have to run the robot's "operating system" in order to interact with and control the robot.  This is described in the "Bringup" set of [[http://wiki.ros.org/turtlebot_bringup/Tutorials/indigo/TurtleBot%20Bringup | tutorials]].  They have some instructions, that you should read and roughly understand, but the ones below are what I recommend following.+Most likely, if you are new to the Turtlebot, then you are new to ROS (Robot Operating System).  ROS is a bunch of written code that runs on top of the standard operating system with lots of functionalities and operations like those of an operating system but tailored to Robotics.  A colleague at University of South Carolina has written a book if you would like a primer on ROS (Jason O'Kane, [[ http://www.cse.sc.edu/~jokane/agitr/ | A Gentle Introduction to ROS]]). Most of the time, you will have to run the robot's "operating system" in order to interact with and control the robot. It permits different processes to communicate with each other without having to worry too much about the low level implementation, or by permitting as much worry as you'd like. Launching this core "operating system" part is described in the "Bringup" set of [[http://wiki.ros.org/turtlebot_bringup/Tutorials/indigo/TurtleBot%20Bringup | tutorials]].  They have some instructions, that you should read and roughly understand, but the ones below are what I recommend.
  
-**1. Launch Turtlebot ROS: ** First, log into the laptop using your username/password, then open up a terminal (Usually by hitting the funny icon at the top left and then typing terminal). As per the [[ttp://wiki.ros.org/turtlebot_bringup/Tutorials/indigo/TurtleBot%20Bringup | bringup tutorial]], the launch process involves typing:+**1. Launch Turtlebot ROS: ** First, log into the laptop using your username/password, connect to wifi, then open up a terminal (Usually by hitting the funny icon at the top left and then typing terminal). As per the [[ttp://wiki.ros.org/turtlebot_bringup/Tutorials/indigo/TurtleBot%20Bringup | bringup tutorial]], the launch process involves typing:
 <code bash> <code bash>
  > roslaunch turtlebot_bringup minimal.launch  > roslaunch turtlebot_bringup minimal.launch
Line 19: Line 19:
 </code> </code>
 which provides a list of services that can be communicated with.  Some of the services will take a message and act on it (like sending motor commands).  Some of the services will send a message if you subscribe to them (like receiving the Turtlebot's SE(2) configuration or getting kinect data).  This shows you a little bit the underbelly of the publisher/subscriber model of ROS.   which provides a list of services that can be communicated with.  Some of the services will take a message and act on it (like sending motor commands).  Some of the services will send a message if you subscribe to them (like receiving the Turtlebot's SE(2) configuration or getting kinect data).  This shows you a little bit the underbelly of the publisher/subscriber model of ROS.  
 +Once this is done, you are ready for the next step.  Gently prep the Turtlebot for movement. Make sure the cables are not dragging on the floor, the laptop is comfortably on the Turtlebot somewhere and won't fall off.  The lid can be closed without having the system suspend or go to sleep, so feel free to close the lid.  Sometimes, for debugging purposes, one wants to keep the lid open and run a system observer (more on that later).
  
- +If you read the Turtlebot tutorials, then they recommend launching this bringup from ssh.  You can do that, but then you'll need to ssh in twice.  Once to launch the bringup, then another time to launch your Turtlebot control code.  I think it's better to just activate it on the laptop, then shut it. After all, you have to login to get the wifi working and might as well as start the services at the same time. 
 + 
 +**2. Teleoperate:** The next step is to teleoperate the robot. In principle that would involve remotely connecting to it in some manner.  For this task, there is no need to do that. Teleoperation can be done using the same laptop that is connected to the Turtlebot.  It just means you'll have to follow the robot as it moves in order to be able to command it. Run the [[http://wiki.ros.org/turtlebot_teleop/Tutorials/indigo/Keyboard%20Teleop|keyboard teleoperation code]] 
 +<code bash> 
 + > roslaunch turtlebot_teleop keyboard_teleop.launch 
 +</code> 
 +After some configuration and setup, it will spit out keyboard teleoperation commands to use.  Hitting the keys should get it to move around.  Be careful, there's not much room in the lab. 
 + 
 +**3. Understanding:** OK, now that you can teleoperate the Turtlebot, it is time to understand what is going on underneath the hood.  Find the code and try to understand it. The teleoperate code performs some of the tasks that you will need to do, which are to drive forward/backward, turn, adjust velocities, etc.  What are the commands to do that?  What are the different options possible?  What are the topics that are published to in order to send the commands?  Later on, you will have to write your own code to control the robot to do stuff.   
 + 
 +You may have to use the command line to look around.  Perhaps ROS has a function for finding where things are located.  In linux it is normally called which, maybe there is a roswhich or something similar.  You may have to google to find it.  Or maybe the teleop code is online somewhere to read. 
 + 
 +===== Remote Connections ===== 
 + 
 +Teleoperation usually involves establishing a remote connection to the robot from another machine.  There are a few option for doing so.  One way is to use the remote machine and ssh to the Turtlebot's laptop. 
 +Once you have logged in, you can run a program that will communicate with the Turtlebot services in order to control it or read what it is sensing. The publish/subscribe implementation of ROS permits inter-process communication. The ROS topics are communication pipes for specific data types. 
 + 
 +Another option is to have a ROS capable remote machine.  In that case, ROS can be set to communicate with the Turtlebot laptop by setting the ROS IP address environment variable.  ROS communication on the remote computer will request data from the Turtlebot computer.  This activity does not require establishing a remote connection.  It does sketch the approaches in case you want to play with them. 
 + 
 + 
 +--------- 
 +;#; 
 +[[: | Main ]] 
 +;#;
turtlebot/firstlaunch.1425603796.txt.gz · Last modified: 2023/03/06 10:31 (external edit)