Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After some investigation I figured out I wasn't handling the transformations properly. I had to add

<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.5 0 0 0 0 0 base_link imu_link" />
<node pkg="tf" type="static_transform_publisher" name="world_frame" args="0 0 0 0 0 0 map odom 100" />

to my launch file where the argument in the bl_imu node is the offset of my IMU. The second line is just for rviz to work.

I also had to add a time stamp to my simulated data:

now = rospy.Time.now()
imu.header.stamp.secs = now.secs
imu.header.stamp.nsecs = now.nsecs

where imu is the Imu object I'm publishing (and similarly for odometry)

After some investigation I figured out I wasn't handling the transformations properly. I had to add the following to my launch file:

<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.5 0 0 0 0 0 base_link imu_link" />
<node pkg="tf" type="static_transform_publisher" name="world_frame" args="0 0 0 0 0 0 map odom 100" />

to my launch file where the The argument in the bl_imu node is the offset of my IMU. The second line is just for rviz to work.

I also had to add a time stamp to my simulated data:

now = rospy.Time.now()
imu.header.stamp.secs = now.secs
imu.header.stamp.nsecs = now.nsecs

where imu is the Imu object I'm publishing (and similarly for odometry)

After some investigation I figured out I wasn't handling the transformations properly. I had to add the following to my launch file:

<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.5 0 0 0 0 0 base_link imu_link" />
<node pkg="tf" type="static_transform_publisher" name="world_frame" args="0 0 0 0 0 0 map odom 100" />

The argument in the bl_imu node is the offset of my IMU. The second line is just for rviz to work.

I also had to add a time stamp to my simulated data:

now = rospy.Time.now()
imu.header.stamp.secs = now.secs
imu.header.stamp.nsecs = now.nsecs

where imu is the Imu object I'm publishing (and similarly for odometry)

After some investigation I figured out I wasn't handling the transformations properly. I had to add the following to my launch file:

<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.5 0 0 0 0 0 base_link imu_link" />
<node pkg="tf" type="static_transform_publisher" name="world_frame" args="0 0 0 0 0 0 map odom 100" />

The argument in the bl_imu node is the offset of my IMU. The second line is just for rviz to work.

I also had to add a time stamp to my simulated data:

now = rospy.Time.now()
imu.header.stamp.secs = now.secs
imu.header.stamp.nsecs = now.nsecs

where imu is the Imu object I'm publishing (and similarly for odometry)

After some investigation I figured out I wasn't handling the transformations properly. I had to add the following to my launch file:

<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.5 0 0 0 0 0 base_link imu_link" />
<node pkg="tf" type="static_transform_publisher" name="world_frame" args="0 0 0 0 0 0 map odom 100" />

The argument in the bl_imu node is the offset of my IMU. IMU and "imu_link" is the header.header_id of my imu topic. The second line is just for rviz to work.

I also had to add a time stamp to my simulated data:

now = rospy.Time.now()
imu.header.stamp.secs = now.secs
imu.header.stamp.nsecs = now.nsecs

where imu is the Imu object I'm publishing (and similarly for odometry)

After some investigation I figured out I wasn't handling the transformations properly. I had to add the following to my launch file:

<node pkg="tf2_ros" type="static_transform_publisher" name="bl_imu" args="0.5 0 0 0 0 0 base_link imu_link" />
<node pkg="tf" type="static_transform_publisher" name="world_frame" args="0 0 0 0 0 0 map odom 100" />

The argument in the bl_imu node is the offset of my IMU and "imu_link" is the header.header_id of my imu topic. The second line is just for rviz to work.

I also had to add a time stamp to my simulated data:

now = rospy.Time.now()
imu.header.stamp.secs = now.secs
imu.header.stamp.nsecs = now.nsecs

where imu is the Imu object I'm publishing (and similarly for odometry)odometry). I'll try to make a more detailed post on this later, since I think this part of the toolbox is tricky to get started with.