ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Where is the topic "imu/data" defined?

asked 2020-12-29 02:21:52 -0500

cmcheung gravatar image

I am running the Clearpath Husky ROS simulation ( and need to change the header frame ID of the topic "imu/data" from "base_link" to add a transform prefix (overall, want it to be "husky_alpha/base_link), so that I can use navsat_transform from robot_localization. I've dug quite extensively in the launch, config, and source files, but can't find any place where I modify or alter that particular topic at all. Any advise on where to go in order to modify "imu/data" so that the header frame_id is different than the default of "base_link"?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-12-29 05:04:28 -0500

Dragonslayer gravatar image

updated 2020-12-31 06:34:41 -0500

Here it is. If um6 or um7 is likely about the version of husky used.



  <!-- Transforms UM7 tilted data in imu_link frame to ENU data in base_link frame -->
  <node pkg="nodelet" type="nodelet" name="imu_data_transformer" args="load imu_transformer/imu_transformer_nodelet imu_manager">
    <remap from="imu_in" to="imu_um7"/>
    <remap from="imu_out/data" to="imu/data_raw"/>
    <remap from="imu_out/mag" to="imu/mag"/>
    <param name="target_frame" value="base_link"/>

EDIT: from comments - Answer was:

You said you tried changing the urdf, but did you add "<frameid>" or really mistook the "<bodyname>" parameter maybe? Take a look -> this

edit flag offensive delete link more


Thanks for the suggestion, but that didn't change it. Going to walk through how I'm testing this to sanity check...

First, I do a "rostopic echo" and see that the frame ID is as follows:

user@mycomputer:~/catkin_ws$ rostopic echo  /husky_alpha/imu/data
      seq: 67434
        secs: 1696
        nsecs: 120000000
      frame_id: "base_link"

I then went into both UM6 & 7 launch files and changed to

I then did rostopic echo again and see the frame_id did not change

user@mycomputer:~/catkin_ws$ rostopic echo  /husky_alpha/imu/data
  seq: 1204
    secs: 371
    nsecs: 740000000
  frame_id: "base_link"

So based on that, looks like nothing changed. Seems like where the change should be is at husky.urdf.xacro, by adding frameID to the IMU plugin, but adding that does nothing as well.

cmcheung gravatar image cmcheung  ( 2020-12-29 13:25:00 -0500 )edit

And for greater clarity, I want to change it because of the following line in navsat_transform:

bool can_transform = RosFilterUtilities::lookupTransformSafe(tf_buffer_,

Right now, base_link_frame_id_ is husky_alpha/base_link, while msg->header.frame_id is just base_link. Trying to change the msg->header.frame_id to have the proper tf prefix so that it correctly matches up.

cmcheung gravatar image cmcheung  ( 2020-12-29 13:27:16 -0500 )edit

Yes, sorry, just realized you are talking about simulation not the real one. The pdf from rosrun tf view_frames would be nice. Frame_id is the link name in the urdf. rosparam dump dump.yaml would be nice to have, to see if it all is actually in the same namespace. Likely navsat isnt in husky_alpha namespace or the other way arround? What does your navsat launchfile look like? Example from roslaunch doc - launch in namespace:

  <!-- start listener node in the 'wg1' namespace -->
  <node ns="husky_alpha" name="listener-wg1" pkg="rospy_tutorials" type="listener" respawn="true" />
  <!-- start a group of nodes in the 'wg2' namespace -->
  <group ns="husky_alpha">
Dragonslayer gravatar image Dragonslayer  ( 2020-12-30 06:39:38 -0500 )edit

Sure! The frames PDF is a beast, because I'm running three robots at the same time. Here it is:

Here's the ROS params dump:

And I'm running navsat with just rosrun as I test it out. So I'm running:

export ROS_NAMESPACE=/husky_alpha
rosrun robot_localization navsat_transform_node

I feel like this warrants further explanation so this makes sense. I'm working on creating a multi-robot delayed GPS way point following system. I have three Husky bots running in Gazebo. I am trying to see if I can use navsat_transform to take a GPS coordinate, and then translate that into the global coordinate frame of the robot. I'm testing this only on one bot now (husky_alpha), but would notionally want this node running on each bot (husky_beta and husky_gamma) so any one of them ...(more)

cmcheung gravatar image cmcheung  ( 2020-12-30 13:27:53 -0500 )edit

You said you tried changing the urdf, but did you add "<frameid>" or really mistook the "<bodyname>" parameter maybe? Take a look -> this.

Dragonslayer gravatar image Dragonslayer  ( 2020-12-30 15:50:20 -0500 )edit

You found my error! I did indeed try it before, but my mistake was using the tag frameID instead of frameId. Thanks for the help!

cmcheung gravatar image cmcheung  ( 2020-12-30 16:38:14 -0500 )edit

Do you want to pull that previous comment out as its own "Answer" post so I can mark it as "correct"? If you don't care about that, I can just pull it out myself and mark it as well; just want to ensure that people see the answer.

cmcheung gravatar image cmcheung  ( 2020-12-30 16:40:08 -0500 )edit

Iam glad I could help you slay your dragon ;) Added the comment to my Answer. So it was a typo then "ID" vs "Id"?

Dragonslayer gravatar image Dragonslayer  ( 2020-12-31 06:30:04 -0500 )edit

Question Tools



Asked: 2020-12-29 02:21:52 -0500

Seen: 718 times

Last updated: Dec 31 '20