## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = How to set up hector_slam for your robot ## multi-line description to be displayed in search ## description = This tutorial shows you how to set frame names and options for using hector_slam with different robot systems. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### <> <> = Overview = [[hector_slam]] uses the [[hector_mapping]] node for learning a map of the environment and simultaneously estimating the platform's 2D pose at laser scanner frame rate. The frame names and options for [[hector_mapping]] have to be set correctly. This tutorial explains the different options. The image below shows all potential frames of interest in a simplified 2D view of a robot travelling through rough terrain, leading to roll and pitch motion of the platform: [[attachment:coordsystems_img.png|{{attachment:coordsystems_img.png|attachment:coordsystems_img.png}}]] The general relationship between the map, odom and base_link frames is already described in [[http://www.ros.org/reps/rep-0105.html|Coordinate Frames for Mobile Platforms]]. We use two frames in between odom and base_link: The base_footprint frame provides no height information and represents the 2D pose of the robot (position and orientation). The base_stabilized frame adds information about the robot height relative to the map/odom layer. The base_link frame is rigidly attached to the robot and adds the roll and pitch angles compared to the base_stabilized frame. For this transformation, a system for estimation of the vehicle attitude like a AHRS or INS can be used (can be realized using the [[hector_imu_attitude_to_tf|hector_imu_attitude_to_tf]] node for example). For a platform not exhibiting roll/pitch motion, the base_stabilized and base_link frames are equal. The transformation from base_link to laser_link is typically provided by a [[tf#static_transform_publisher|static transform publisher]] or the [[robot_state_publisher|robot state publisher]]. = Setup = We assume that the reader has a basic understanding of ROS parameters and launch files for the following section. The [[hector_slam_launch]] package contains some launch files that might serve as examples. == Use in place of gmapping == [[gmapping]] publishes the map->odom transform. You have to set the following parameters of [[hector_mapping]] to reflect the setup on your platform: {{{ }}} If your platform exhibits roll/pitch motion you have to set the base_frame so it has the properties of the base_stabilized frame described in the Overview section above. == Use without odom frame == If you do not require the use of a odom frame (for example because your platform does not provide any usable odometry) you can directly publish a transformation from map to base_link: {{{ }}} == Use without Broadcasting of transformations == The system can also be used without broadcasting any tf transformation. This can be useful if another node is responsible for publishing the map->odom or map->base_frame transform. This can be done by setting: {{{ }}} In this case, the estimated pose published on the poseupdate topic of [[hector_mapping]] might be used for example by a INS system which then publishes a map->base_frame transform. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE