ros nodes: add mixer for euroc

This commit is contained in:
Thomas Gubler 2015-01-02 12:22:06 +01:00
parent 92729b3020
commit 3932013777
1 changed files with 9 additions and 1 deletions

View File

@ -90,15 +90,23 @@ const MultirotorMixer::Rotor _config_quad_plus[] = {
{ -0.000000, -1.000000, -1.00 },
};
const MultirotorMixer::Rotor _config_quad_plus_euroc[] = {
{ 0.000000, 1.000000, 1.00 },
{ -0.000000, -1.000000, 1.00 },
{ 1.000000, 0.000000, -1.00 },
{ -1.000000, 0.000000, -1.00 },
};
const MultirotorMixer::Rotor *_config_index[3] = {
&_config_x[0],
&_config_quad_plus[0],
&_config_quad_plus_euroc[0]
};
MultirotorMixer::MultirotorMixer():
_n(),
_rotor_count(4),
_rotors(_config_index[1]) //XXX +config hardcoded
_rotors(_config_index[2]) //XXX + eurocconfig hardcoded
{
_sub = _n.subscribe("actuator_controls_0", 1, &MultirotorMixer::actuatorControlsCallback,this);
_pub = _n.advertise<mav_msgs::MotorSpeed>("/mixed_motor_commands",10);