Skip to content
Snippets Groups Projects
Commit 18cc20b0 authored by Thomas Gubler's avatar Thomas Gubler
Browse files

parametrize imu input for ros dummy att estimator

parent 515266c1
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@
<param name="MPC_XY_VEL_I" type="double" value="0.0" />
<param name="MPC_XY_VEL_D" type="double" value="0.01" />
<param name="MPC_XY_VEL_MAX" type="double" value="2.0" />
<param name="vehicle_model" type="string" value="ardrone" />
</group>
</launch>
<launch>
<include file="$(find mav_gazebo)/launch/ardrone_empty_world_with_joy.launch" />
<!-- <include file="$(find mav_gazebo)/launch/ardrone_empty_world.launch" /> -->
<include file="$(find px4)/launch/ardrone.launch" />
</launch>
......@@ -48,9 +48,11 @@
AttitudeEstimator::AttitudeEstimator() :
_n(),
// _sub_modelstates(_n.subscribe("/gazebo/model_states", 1, &AttitudeEstimator::ModelStatesCallback, this)),
_sub_imu(_n.subscribe("/px4_multicopter/imu", 1, &AttitudeEstimator::ImuCallback, this)),
_vehicle_attitude_pub(_n.advertise<px4::vehicle_attitude>("vehicle_attitude", 1))
{
std::string vehicle_model;
_n.param("vehicle_model", vehicle_model, std::string("iris"));
_sub_imu = _n.subscribe("/" + vehicle_model + "/imu", 1, &AttitudeEstimator::ImuCallback, this);
}
void AttitudeEstimator::ModelStatesCallback(const gazebo_msgs::ModelStatesConstPtr &msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment