ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Handling topic names for secondary IMU and IMU Filter

Hello everyone, I’m relatively new when it comes to ROS, so bare with me here if this is a pretty basic question.

To summarize my setup, I’m working with a Clearpath Jackal robot that runs ROS Indigo on Ubuntu 14.05 LTS. On board, the robot has a GPS and IMU unit, and starts up its own ROS components for these sensors as well as a controller node for a bluetooth PS3 controller.

The above works great, but the hurdle I’m running into is when I try to integrate our own IMU unit into the mix, which is a PhidgetSpatial Precision 3/3/3, I believe.

I have a launch file for our IMU that runs a few nodes, and is pretty much the same as this example here:

The problem I’m running into is getting the IMU filter to subscribe to the Phidget IMU topics. The IMU filter is looking for /imu/data_raw and /imu/mag topics to subscribe to, which are published by the IMU itself. For my case, these two topics are already being published by the default IMU on the Jackal. I’d like to be able to run our Phidget IMU launch file alongside the Jackal’s nodes and topics.

I’ve tried giving the nodes in the Phidget IMU launch file their own namespace, but the IMU filter node never subscribes to the Phidget IMU node’s topics.

Here is some additional info to make this a little easier to see what’s going on:

The Jackal’s topics at startup:


Have Phidget IMU node publish /phidget/imu/data_raw and /phidget/imu/mag, which the IMU filter subscribes to instead of /imu/data_raw and /imu/mag.

Any help would be greatly appreciated, and I can provide any additional details if needed. It’s probably something pretty simple to someone more versed in ROS. I’ve tried using ‘ns’ for handling the IMU nodes with a different namespace, and messed around some with ‘remap’, but haven’t had any luck.



Hi, @popenc, welcome to ROS! :smile:

Maintainer of phidgets_drivers here. There are many ways of doing this. From the command line:

ROS_NAMESPACE=phidget roslaunch phidgets_imu imu_single_nodes.launch

Inside another launch file:

    <include file="$(find phidgets_imu)/launch/imu.launch" ns="phidget" />

… or by copying and then editing the launch file directly, and adding remappings to the nodes/nodelets, like this:

  <node pkg="nodelet" type="nodelet" name="PhidgetsImuNodelet" 
    args="load phidgets_imu/PhidgetsImuNodelet imu_manager" 

    <remap from="imu/data_raw" to="phidget/imu/data_raw" />
    ... and so on ...

  <node pkg="nodelet" type="nodelet" name="ImuFilterNodelet" 
    args="load imu_filter_madgwick/ImuFilterNodelet imu_manager" 

    <remap from="imu/data_raw" to="phidget/imu/data_raw" />
    ... and so on ...

When using remappings, remember that you have to remap both the publisher and subscriber, and that “from” and “to” don’t mean the direction of the data flow, but “from” the old name “to” the new name.

Also, I’d recommend using imu_single_nodes.launch from the same directory. With nodelets, it can be harder to see what’s going on using tools like rostopic, rosnode or rqt_graph.

P.S.: It’s preferred to ask questions like these (i.e., which have a clear “right” answer) on and keep for other kinds of discussions (open-ended discussions, project announcements and so on).

1 Like

Thanks for all the info, @Martin_Guenther!

I see what you’re saying about posting location. I’ll make sure to post something like this over at answers next time. I’ll try what you mentioned here and provide the outcome.

thanks again!


The 2nd suggestion @Martin_Guenther provided, which included the IMU launch file with a namespace worked for me! Thanks a lot for the help, and next time I’ll make sure to post something like this over at