robot_localization (fake) IMU + gps setup Error
Hello, I am working on getting the robot_localization package up and running to estimate pose using an IMU and a gps, but I'm having a bit of trouble. I've read through the whole docs and I'm still getting an error:
[ERROR] [1613686575.266536469]: Could not obtain transform from odom->base_link
[ WARN] [1613686575.592023869]: Could not obtain map->base_link transform. Will not remove offset of navsat device from robots origin.
[ WARN] [1613686576.692104170]: Could not obtain transform from base_link to map. Error was "map" passed to lookupTransform argument target_frame does not exist.
Currently I'm generating fake gps and imu data over /gps/fix
and /imu/data
with with the following code (simplified):
def main(args=None):
rospy.init_node('gps_imu_node', anonymous=True)
gps_pub = rospy.Publisher('gps/fix', NavSatFix, queue_size=10)
imu_pub = rospy.Publisher('imu/data', Imu, queue_size=10)
rate = rospy.Rate(10)
while not rospy.is_shutdown():
# GPS
msg = NavSatFix()
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.header.frame_id = "base_link"
# Position in degrees.
msg.latitude = 57.047218
msg.longitude = 9.920100
gps_pub.publish(msg)
# IMU
msg = Imu()
msg.header = Header()
msg.header.stamp = rospy.Time.now()
msg.header.frame_id = "base_link"
imu_pub.publish(msg)
rate.sleep()
I'm filling it with data, but for example's sake I've taken that out, as that's not related to my error (I don't think).
Additionally, I'm running the navsat_transform_node
with the following paramaters:
<launch>
<!-- -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="magnetic_declination_radians" value="0"/>
<param name="yaw_offset" value="0"/>
<param name="zero_altitude" value="true"/>
<param name="broadcast_cartesian_transform" value="false"/>
<param name="publish_filtered_gps" value="true"/>
<param name="use_odometry_yaw" value="false"/>
<param name="wait_for_datum" value="false"/>
<remap from="/imu/data" to="/imu/data" />
<remap from="/gps/fix" to="/gps/fix" />
<remap from="/odometry/filtered" to="/odometry/filtered" />
</node>
</launch>
And I'm running ekf_localization_node
with the following yaml config file:
frequency: 50
two_d_mode: true
publish_tf: true
odom_frame: odom
base_link_frame: base_link
world_frame: map
map_frame: map
imu0: /imu/data
imu0_config: [false, false, false,
false, false, true,
false, false, false,
false, false, true,
true, false, false]
imu0_differential: false
odom0: /odometry/gps
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, true,
false, false, false]
odom0_differential: false
process_noise_covariance: [0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0 ...