Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.94 KB | None | 0 0
  1. <launch>
  2.  
  3. <!-- This node will take in measurements from odometry, IMU, stamped pose, and stamped twist messages. It tracks
  4. the state of the robot, with the state vector being defined as X position, Y position, Z position,
  5. roll, pitch, yaw, their respective velocites, and linear acceleration. Units for all measurements are assumed
  6. to conform to the SI standard as specified in REP-103. -->
  7. <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">
  8.  
  9. <!-- ======== STANDARD PARAMETERS ======== -->
  10.  
  11. <!-- The frequency, in Hz, at which the filter will output a position estimate. Note that
  12. the filter will not begin computation until it receives at least one message from
  13. one of the inputs. It will then run continuously at the frequency specified here,
  14. regardless of whether it receives more measurements. Defaults to 30 if unspecified. -->
  15. <param name="frequency" value="30"/>
  16.  
  17. <!-- The period, in seconds, after which we consider a sensor to have timed out. In this event, we
  18. carry out a predict cycle on the EKF without correcting it. This parameter can be thought of
  19. as the minimum frequency with which the filter will generate new output. Defaults to 1 / frequency
  20. if not specified. -->
  21. <param name="sensor_timeout" value="0.1"/>
  22.  
  23. <!-- If this is set to true, no 3D information will be used in your state estimate. Use this if you
  24. are operating in a planar environment and want to ignore the effect of small variations in the
  25. ground plane that might otherwise be detected by, for example, an IMU. Defaults to false if
  26. unspecified. -->
  27. <param name="two_d_mode" value="true"/>
  28.  
  29. <!-- REP-105 (http://www.ros.org/reps/rep-0105.html) specifies three principal coordinate frames: map,
  30. odom, and base_link. base_link is the coordinate frame that is affixed to the robot. The robot's
  31. position in the odom frame will drift over time, but is accurate in the short term and should be
  32. continuous. The odom frame is therefore the best frame for executing local motion plans. The map
  33. frame, like the odom frame, is a world-fixed coordinate frame, and while it contains the most
  34. globally accurate position estimate for your robot, it is subject to discrete jumps, e.g., due to
  35. the fusion of GPS data. Here is how to use the following settings:
  36. 1. Set the map_frame, odom_frame, and base_link frames to the appropriate frame names for your system.
  37. * If your system does not have a map_frame, just remove it, and make sure "world_frame" is set
  38. to the value of odom_frame.
  39. 2. If you are fusing continuous position data such as wheel encoder odometry, visual odometry, or IMU data,
  40. set "world_frame" to your odom_frame value. This is the default behavior for robot_localization's state
  41. estimation nodes.
  42. 3. If you are fusing global absolute position data that is subject to discrete jumps (e.g., GPS or position
  43. updates from landmark observations) then:
  44. 3a. Set your "world_frame" to your map_frame value
  45. 3b. MAKE SURE something else is generating the odom->base_link transform. Note that this can even be
  46. another instance of robot_localization! However, that instance should *not* fuse the global data. -->
  47. <!-- Defaults to "map" if unspecified -->
  48. <param name="map_frame" value="map"/>
  49. <!-- Defaults to "odom" if unspecified -->
  50. <param name="odom_frame" value="odom"/>
  51. <!-- Defaults to "base_link" if unspecified -->
  52. <param name="base_link_frame" value="base_footprint"/>
  53. <!-- Defaults to the value of "odom_frame" if unspecified -->
  54. <param name="world_frame" value="odom"/>
  55.  
  56. <!-- Use this parameter to provide an offset to the transform generated by ekf_localization_node. This
  57. can be used for future dating the transform, which is required for interaction with some other
  58. packages. Defaults to 0.0 if unspecified. -->
  59. <param name="transform_time_offset" value="0.0"/>
  60.  
  61. <!-- The filter accepts an arbitrary number of inputs from each input message type (Odometry, PoseStamped,
  62. TwistStamped, Imu). To add a new one, simply append the next number in the sequence to its base name,
  63. e.g., odom0, odom1, twist0, twist1, imu0, imu1, imu2, etc. The value should be the topic name. These
  64. parameters obviously have no default values, and must be specified. -->
  65. <param name="odom0" value="odom"/>
  66.  
  67. <!-- Each sensor reading updates some or all of the filter's state. These options give you greater control over
  68. which values from each measurement are fed to the filter. For example, if you have an odometry message as input,
  69. but only want to use its Z position value, then set the entire vector to false, except for the third entry.
  70. The order of the values is x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az. Note that not some
  71. message types lack certain variables. For example, a TwistWithCovarianceStamped message has no pose information, so
  72. the first six values would be meaningless in that case. Each vector defaults to all false if unspecified, effectively
  73. making this parameter required for each sensor. -->
  74. <rosparam param="odom0_config">[true, false, false,
  75. false, false, true,
  76. false, false, false,
  77. false, false, false,
  78. false, false, false]</rosparam>
  79.  
  80. <!-- The best practice for including new sensors in robot_localization's state estimation nodes is to pass in velocity
  81. measurements and let the nodes integrate them. However, this isn't always feasible, and so the state estimation
  82. nodes support fusion of absolute measurements. If you have more than one sensor providing absolute measurements,
  83. however, you may run into problems if your covariances are not large enough, as the sensors will inevitably
  84. diverge from one another, causing the filter to jump back and forth rapidly. To combat this situation, you can
  85. either increase the covariances for the variables in question, or you can simply set the sensor's differential
  86. parameter to true. When differential mode is enabled, all absolute pose data is converted to velocity data by
  87. differentiating the absolute pose measurements. These velocities are then integrated as usual. NOTE: this only
  88. applies to sensors that provide absolute measurements, so setting differential to true for twit measurements has
  89. no effect.
  90. Users should take care when setting this to true for orientation variables: if you have only one source of
  91. absolute orientation data, you should not set the differential parameter to true. This is due to the fact that
  92. integration of velocities leads to slowly increasing error in the absolute (pose) variable. For position variables,
  93. this is acceptable. For orientation variables, it can lead to trouble. Users should make sure that all orientation
  94. variables have at least one source of absolute measurement. -->
  95. <param name="odom0_differential" value="true"/>
  96.  
  97. <!-- When the node starts, if this parameter is true, then the first measurement is treated as a "zero point" for all
  98. future measurements. While you can achieve the same effect with the differential paremeter, the key difference is
  99. that the relative parameter doesn't cause the measurement to be converted to a velocity before integrating it. If
  100. you simply want your measurements to start at 0 for a given sensor, set this to true. -->
  101. <param name="odom0_relative" value="false"/>
  102.  
  103. <!-- If you're having trouble, try setting this to true, and then echo the /diagnostics_agg topic to see
  104. if the node is unhappy with any settings or data. -->
  105. <param name="print_diagnostics" value="true"/>
  106.  
  107. <!-- ======== ADVANCED PARAMETERS ======== -->
  108.  
  109. <!-- Most users will be able to remove these parameters from the launch file without any consequences. We recommend
  110. that users do not set values for these parameters without having a thorough understanding of
  111. the parameters do. -->
  112.  
  113. <!-- By default, the subscription queue size for each message type is 1. If you wish to increase that so as not
  114. miss any messages (even if your frequency is set to a relatively small value), increase these. -->
  115. <param name="odom0_queue_size" value="2"/>
  116.  
  117. <!-- If your data is subject to outliers, use these threshold settings, expressed as Mahalanobis distances, to control
  118. how far away from the current vehicle state a sensor measurement is permitted to be. Each defaults to
  119. numeric_limits<double>::max() if unspecified. -->
  120. <param name="odom0_pose_rejection_threshold" value="5"/>
  121. <param name="odom0_twist_rejection_threshold" value="1"/>
  122.  
  123. <!-- Debug settings. Not for the faint of heart. Outputs a ludicrous amount of information to the file
  124. specified by debug_out_file. I hope you like matrices! Defaults to false if unspecified. -->
  125. <param name="debug" value="false"/>
  126. <!-- Defaults to "robot_localization_debug.txt" if unspecified. -->
  127. <param name="debug_out_file" value="debug_ekf_localization.txt"/>
  128.  
  129. <!-- The process noise covariance matrix can be difficult to tune, and can vary for each application, so it
  130. is exposed as a configuration parameter. The values are ordered as x, y, z, roll, pitch, yaw, vx, vy, vz,
  131. vroll, vpitch, vyaw, ax, ay, az. Defaults to the matrix below if unspecified. -->
  132. <rosparam param="process_noise_covariance">[0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  133. 0, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  134. 0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  135. 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  136. 0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  137. 0, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  138. 0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0, 0,
  139. 0, 0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0,
  140. 0, 0, 0, 0, 0, 0, 0, 0, 0.04, 0, 0, 0, 0, 0, 0,
  141. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0, 0,
  142. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0,
  143. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.02, 0, 0, 0,
  144. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0,
  145. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0,
  146. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.015]</rosparam>
  147.  
  148. <!-- This represents the initial value for the state estimate error covariance matrix. Setting a diagonal value (a
  149. variance) to a large value will result in early measurements for that variable being accepted quickly. Users should
  150. take care not to use large values for variables that will not be measured directly. The values are ordered as x, y,
  151. z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az. Defaults to the matrix below if unspecified. -->
  152. <rosparam param="initial_estimate_covariance">[1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  153. 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  154. 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  155. 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  156. 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  157. 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  158. 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0,
  159. 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0,
  160. 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0,
  161. 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0,
  162. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0,
  163. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0,
  164. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0,
  165. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0,
  166. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9]</rosparam>
  167.  
  168.  
  169. <!-- Placeholder for output topic remapping
  170. <remap from="odometry/filtered" to=""/>
  171. -->
  172.  
  173. </node>
  174.  
  175. </launch>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement