Advertisement
Guest User

ekf_localization_2.launch

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