How does Xsens send data in ROS?

If everything is fine, you can see the topic list by using the rostopic command:

    $ rostopic list
  

The node will publish three topics. We will work with /imu/data in this section. First of all, we are going to see the type and the data sent by this topic. To see the type and the fields, use the following command lines:

    $ rostopic type /imu/data
    $ rostopic type /imu/data | rosmsg show
  

The /imu/data topic is sensor_msg/Imu. The fields are used to indicate the orientation, acceleration, and velocity. In our example, we will use the orientation field. Check a message to see a real example of the data sent. You can do it with the following command:

    $ rostopic echo /imu/data
  

You will see something similar to the following output:

    ---
    header:
    seq: 288
    stamp:
    secs: 1330631562
    nsecs: 789304161
    frame_id: xsens_mti_imu
    orientation:
    x: 0.00401890464127
    y: -0.00402884092182
    z: 0.679586052895
    w: 0.73357373476
    ---
  

If you observe the orientation field, you will see four variables instead of three, as you would probably expect. This is because in ROS, the spatial orientation is represented using quaternions. You can find a lot of literature on the Internet about this concise and nonambiguous orientation representation.

We can observe the IMU orientation in the rviz run and add the imu display type:

    $ rosrun rviz rviz
  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.136.142