forked from Archive/PX4-Autopilot
parametrize imu input for ros dummy att estimator
This commit is contained in:
parent
515266c163
commit
18cc20b04b
|
@ -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>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<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)
|
||||
|
|
Loading…
Reference in New Issue