CCNYRoboticsLab / imu_tools

ROS tools for IMU devices
Other
898 stars 425 forks source link

remap `/imu/data_raw` to other imu topic inside launch file #142

Closed fjp closed 2 years ago

fjp commented 2 years ago

Hi @mintar, I have a ros bag file that publishes imu data on the /alphasense/imu topic and I would like to remap this to /imu/data_raw inside my launch file:

<node pkg="imu_filter_madgwick" type="imu_filter_node" name="imu_filter_madgwick" output="screen" respawn="false" >
    <remap from="/imu/data_raw" to="/alphasense/imu"/>
    <param name="fixed_frame" value="base_link" />
    <param name="use_mag" value="true" />
    <param name="publish_tf" value="false" />
    <param name="use_magnetic_field_msg" value="true" /> 
    <param name="world_frame" value="enu" />
    <param name="orientation_stddev" value="0.05" />
</node>

Unfortunately I am still seeing these warnings:

[ WARN] [1630269232.202243560]: Still waiting for data on topics /imu/data_raw and /imu/mag...
[ WARN] [1630269242.202246389]: Still waiting for data on topics /imu/data_raw and /imu/mag...

Is there a way to remap the topics inside the launch file? Or is it only possible to remap using the rosbag command?

fjp commented 2 years ago

The problem is solved when I set both use_mag and use_magnetic_field_msg to false.