Learning ROS For Robotics

Transcription

Learning ROSProgrammingfor RoboticsApractical, instructive, and comprehensive guideto introduce yourself to ROS, the top-notch, leadingrobotics frameworkAaron MartinezEnriqueFernandezopensourcecommunity experiencePUBLISHINGBIRMINGHAM-MUMBAIdistilled

Table of ContentsPreface1Chapter 1: Getting Started with ROSInstalling ROS Electric using repositoriesAdding repositories to your sources.list fileSetting up your keys710-121212Installationsetup13Installing ROS Fuerte using repositoriesConfiguring your Ubuntu repositoriesSetting up your source.list fileSetting up your keys14The environment-14151515InstallationThe environment17setup18Standalone tools18How to install Virtual Box and Ubuntu19Downloading VirtualBoxCreating19the virtual machineSummaryChapter 2: The ROS Architecture with Examples232526Understanding the ROS Filesystem anding the ROS Computation Graphlevel32Nodes34Topics35Services36

Tableof ContentsMessages37Bags37Master38Parameter Server3839Understanding the ROS Community levelSome tutorials topractice with ROSNavigating throughCreatingour ownthe g an ROS packagePlaying with ROS nodesLearning how to interact with topics41Learning how to49anUsingROS424245use services51the Parameter ServerCreating52nodes55Building the nodeCreatingmsg andUsing thenew srvfilessrv5758and msg files62SummaryChapter 3: Debugging and Visualization63nodes66Debugging ROSUsingthe GDBAttachingEnablingadebuggernode to GDB whilecorenames67launching ROS68dumps for ROS nodesDebugging messagesOutputting a debug messageSetting the debug message levelConfiguring the debugging level ofGiving66with ROS nodes696970a71particular node72to messages73Conditional and filtered messagesMore messages-once,throttle, and combinationsUsing rosconsole and rxconsole to modify the debugging levelInspecting what is going onListing nodes, topics, and servicesInspecting the node's graph online with rxgraphWhensomething weird happensscalar data-roswtf!PlottingCreating a time series plot with rxplotOther plotting utilitiesrxtools-74onthefly7580808083838486

Table of ContentsVisualization of imagesVisualizingFireWireWorkinga8787single image88cameraswith stereo vision903D visualization91Visualizing data on a 3D world using rvizThe relationship between topics and framesVisualizing frame transformations929494Saving and playing back dataWhat isabagRecording data inback96file?97abag file with rosbag98filePlayingbagInspecting all the topics and messages in a bag file using rxbagrqt plugins versus rx applicationsSummaryChapter 4: Using Sensors and Actuators with ROSUsingajoystickorHow does111113115116and how toseeit?UsingXsens MTiHow does Xsens send data in ROS?Creating an example to use XsensUsing a low-cost IMU -10 degrees of freedomDownloading the library for the accelerometerProgramming Arduino Nano and the 10DOF sensorCreating a ROS node to use data from the 10DOF sensorSummary117119121--103110Creating an example to use KinectUsing servomotors DynamixelHow does Dynamixel send and receive commands for theCreating an example to use the servomotorUsing Arduino to add more sensors and actuatorsCreating an example to use Arduinothe IMU102106Creating a launch fileUsing the Kinect sensor to view in 3Dsensors102105-How does Kinect send data from the100104gamepadjoy node send joystick movements?Using joystick data to move a turtle in turtlesimUsing a laser rangefinder Hokuyo URG-04lxUnderstanding how the laser sends data in ROSAccessing the laser data and modifying 0

Tableof ContentsChapter 5: 3D Modeling and SimulationA 3D model ofourrobot in ROSfirst URDF file141141CreatingExplaining the file formatWatching the 3D model on rviz142meshes to147ourLoadingMakingourourmodelsrobot model movablePhysical and collision propertiesXacro-abetter way to writeour robot modelsUsing constantsUsingUsing macrosMoving the robot with code3D modeling with SketchUpAdding156158aSummaryChapter 6: Computer VisionrunningFireWire IEEE 1394USBthe159162map in GazebotherobotinGazeboMovingConnecting150152to GazeboLoading and usingand149151URDF 3D model in Gazebosensors148151Simulation in 73174178camerasMaking your own USB camera driver with OpenCVCreating the USB camera driver packageUsing the ImageTransport API to publish the camera framesDealing with OpenCV and ROS images using cv bridgePublishing images with ImageTransportUsing OpenCV in ROSVisualizing the camera input images180How to calibrate the188cameraStereo calibrationThe ROSimage pipelineImage pipeline for stereo camerasROS packages useful for computer vision tasksPerforming visual odometry with viso2Camera pose calibration181182186187188188193198201204205206

Table of ContentsRunning the viso2 online demoRunning viso2 with210low-cost stereoourcamera214SummaryChapter 7: Navigation Stack-Robot Setupsnavigation stack in ROSCreating transformsCreating a broadcasterCreating a listenerTheWatchingPublishingCreating217218218the transformation treesensorinformationCreatingaour own221222the laser nodeHow Gazebo creates the215216223Publishing odometry e controller234Gazebo to create theUsingodometryCreating our base controllerCreating a map with ROSSaving the map using map server236Loading the map using map server244SummaryChapter 8: Navigation Stack238241243245-Beyond SetupsCreating a packageCreating a robot configurationConfiguring the costmaps (global costmap) and (local costmap)Configuring the common parametersConfiguring the global costmapConfiguring the local costmapBase local planner configurationCreating a launch file for the navigation stackSetting up rviz for the navigation stack2472482482512512532532542552562D pose estimate2572D nav258goalStatic map258Particle cloud259Robot footprintObstacles260Inflated obstacles262261

Tableof ContentsplanplanPlanner planCurrent goalGlobal262Local263Adaptive264264Monte Carlo Localization(AMCL)266Avoiding obstacles268Sending goals269Summary273Chapter 9: Combining EverythingREEM--Learn by Doingthe humanoid of PAL RoboticsREEM from the officialInstallingrepositoryRunning REEM using the Gazebo simulatorPR2-the WillowGaragerobot285289mappingRunning the demos of the PR2 simulatorRobonaut 2-the dexterous humanoid of NASAInstalling the Robonaut 2 from the sourcesRunning Robonaut 2 in the ISS fixed pedestalControlling theControlling the297roverof298Robotics299300simulation300the low-cost mobile robot302onInstalling the TurtleBot simulationRunning TurtleBot on simulationSummaryIndex294295Running HuskyTurtleBot293295easily with interactive markersClearpathHuskyInstalling the Husky simulator-293robotLoading the ISS environmentthe292Robonaut 2 armsGiving legs to Robonaut 2-282285PR2 in simulationLocalization and276278284Installing the PR2 simulatorRunning275302303303305

Learning ROS for robotics programming : a practical, instructive, and comprehensive guide to introduce yourself to ROS, the top-notch, leading robotics framework Subject: Birmingham [u.a.], Packt Publ., 2013 Keywords: Signatur des Originals (Print): U 14 B 392. Digitalisiert von der TIB, Hannover, 2014. Created Date: 4/11/2014 11:09:44 AM