how do i add barometer and gps data to robot localization?
im trying to build out the odometry for a drone and so far i got the imu fed in. but i can't figure out how to feed in the barometer(Altitude) and gps or the format they should be in. i tried reading thru the robot localization documentation but i just couldn't make sense of it. down below is the launch file im working with.
<launch>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">
<param name="frequency" value="10"/>
<param name="sensor_timeout" value="0.2"/>
<param name="two_d_mode" value="true"/>
<param name="map_frame" value="map"/>
<param name="odom_frame" value="odom"/>
<param name="base_link_frame" value="drone_link"/>
<param name="world_frame" value="odom"/>
<param name="odom0" value="odom"/>
<param name="imu0" value="/imu/data"/>
<rosparam param="odom0_config">[true, true, true,
false, false, true,
true, true, false,
false, false, true,
false, false, false]</rosparam>
<rosparam param="imu0_config">[false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]</rosparam>
<param name="odom0_differential" value="true"/>
<param name="imu0_differential" value="true"/>
<param name="imu0_remove_gravitational_acceleration" value="false"/>
<rosparam param="process_noise_covariance">[LARGE ARRAY with small values]</rosparam>
<rosparam param="initial_estimate_covariance">[LARGE ARRAY with 1e-9]</rosparam>
</node>
</launch>
What could you not make sense of? What make barometer different than imu data?
my imu sensor has an accelerometer, gyro, and compass, with that i got the acceleration, angular velocity and orientation. the barometer will only give me altitude
What is the topic type? Odom/pose/imu or some custom data type from the barometer?
at the moment i just have the raw barometer data converted to meters. i don't know the exact topic type i should publish it as to feed it into the localization node
Publish your barometer message as one of these types and integrating it should be natural, just like you did your imu or odom.
thats where im stuck at i don't quite follow how the barometer should be publish and what should the param for it be? i can't find any explanation or example of integrating altitude.
Not knowing how to publish a message with the correct type is more fundamental than robot_localization. Check out c++ pub/sub or the equivalent tutorials in python.
it's not that, i don't now the format the altitude should be publish as. for example, for my imu i used sensor_msg.msg imu to setup the msg and published the imu.
this is where i setup the msg from my imu sensor then i published the msg