[ros-users] [Discourse.ros.org] [ROS Projects] Handling topi…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Martin Günther via ros-users
Date:  
To: ros-users
CC: Martin Günther
Subject: [ros-users] [Discourse.ros.org] [ROS Projects] Handling topic names for secondary IMU and IMU Filter


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.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>