[ros-users] [Discourse.ros.org] [ROS Projects] Handling topic names for secondary IMU and IMU Filter
Martin Günther
ros.discourse at gmail.com
Fri May 18 15:33:25 UTC 2018
Hi, @popenc, welcome to ROS! :smile:
Maintainer of `phidgets_drivers` here. There are many ways of doing this. From the command line:
```bash
ROS_NAMESPACE=phidget roslaunch phidgets_imu imu_single_nodes.launch
```
Inside another launch file:
```xml
<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:
```xml
<node pkg="nodelet" type="nodelet" name="PhidgetsImuNodelet"
args="load phidgets_imu/PhidgetsImuNodelet imu_manager"
output="screen">
<remap from="imu/data_raw" to="phidget/imu/data_raw" />
... and so on ...
</node>
<node pkg="nodelet" type="nodelet" name="ImuFilterNodelet"
args="load imu_filter_madgwick/ImuFilterNodelet imu_manager"
output="screen">
<remap from="imu/data_raw" to="phidget/imu/data_raw" />
... and so on ...
</node>
```
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 http://answers.ros.org/ and keep discourse.ros.org for other kinds of discussions (open-ended discussions, project announcements and so on).
---
[Visit Topic](https://discourse.ros.org/t/handling-topic-names-for-secondary-imu-and-imu-filter/4829/2) or reply to this email to respond.
More information about the ros-users
mailing list