Merge pull request #38 from mikehamer/master

navdata_packet.header now filled, also using cmd_vel.angular.x/y != 0 for hover
Esse commit está contido em:
Mani Monajjemi
2012-11-23 14:15:12 -08:00
6 arquivos alterados com 428 adições e 384 exclusões
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-11
Ver Arquivo
@@ -12,9 +12,6 @@ navdata_wind_speed_t shared_navdata_wind;
navdata_time_t shared_arnavtime;
navdata_unpacked_t shared_raw_navdata;
bool command_disable_hover;
bool command_always_send;
vp_os_mutex_t navdata_lock;
vp_os_mutex_t video_lock;
vp_os_mutex_t twist_lock;
@@ -66,14 +63,6 @@ extern "C" {
}
command_disable_hover = false; //disables the drone from entering the hover state - constant dynamics rather than onboard state changes
command_always_send = false; //constantly sends navdata messages to the drone, even if the messages haven't changed
ros::param::param("~command_disable_hover", command_disable_hover, false);
ros::param::param("~command_always_send" , command_always_send, false);
ROS_INFO("Hovering is %s",(command_disable_hover?"DISABLED!":"Enabled."));
ROS_INFO("Will %s send duplicate commands.",(command_always_send?"ALWAYS":"not"));
// SET SOME NON-STANDARD DEFAULT VALUES FOR THE DRIVER
// THESE CAN BE OVERWRITTEN BY ROS PARAMETERS (below)
ardrone_application_default_config.bitrate_ctrl_mode = VBC_MODE_DISABLED;
-3
Ver Arquivo
@@ -54,9 +54,6 @@ extern navdata_magneto_t shared_navdata_magneto;
extern navdata_wind_speed_t shared_navdata_wind;
extern navdata_unpacked_t shared_raw_navdata;
extern bool command_disable_hover;
extern bool command_always_send;
extern vp_os_mutex_t navdata_lock;
extern vp_os_mutex_t video_lock;
extern vp_os_mutex_t twist_lock;
+1 -2
Ver Arquivo
@@ -155,8 +155,7 @@ C_RESULT update_teleop(void)
(fabs(turn) < _EPS)
);
if(command_disable_hover) hover = 1; //force the hover flag to 1 (0 == enter hover) if we want to disable the hover state
if(command_always_send) is_changed = true; //force the packet to send if so desired
if(cmd_vel.angular.x > _EPS || cmd_vel.angular.y > _EPS) hover=1; //set angular.x or angular.y to a non-zero value to disable entering hover
control_flag |= (hover << 0);
control_flag |= (combined_yaw << 1);