This is an experimental state where bitrate ctrl mode is activated.

Esse commit está contido em:
Mani Monajjemi
2012-07-01 14:27:03 -07:00
commit 417cdc1a41
3 arquivos alterados com 25 adições e 4 exclusões
+10 -2
Ver Arquivo
@@ -54,7 +54,9 @@ void ARDroneDriver::run()
//These are some extra params (experimental)
int mCodec = P264_CODEC;
int vbcMode = VBC_MODE_DYNAMIC;
int32_t vbcMode = 0;
int32_t bitrate = 2000;
int maxbitrate = 4000;
//int cam_state = DEFAULT_CAM_STATE; // 0 for forward and 1 for vertical, change to enum later
//int set_navdata_demo_value = DEFAULT_NAVDATA_DEMO;
@@ -73,7 +75,7 @@ void ARDroneDriver::run()
fprintf(stderr, "\nSending some critical initial configuration after some delay...\n");
//Ensure that the horizontal camera is running
ARDRONE_TOOL_CONFIGURATION_ADDEVENT (video_channel, &cam_state, NULL);
ARDRONE_TOOL_CONFIGURATION_ADDEVENT (navdata_demo, &set_navdata_demo_value, NULL);
//ARDRONE_TOOL_CONFIGURATION_ADDEVENT (navdata_demo, &set_navdata_demo_value, NULL);
//ARDRONE_TOOL_CONFIGURATION_ADDEVENT (video_codec, &mCodec, NULL);
//ARDRONE_TOOL_CONFIGURATION_ADDEVENT (bitrate_ctrl_mode, &vbcMode, NULL);
@@ -83,6 +85,12 @@ void ARDroneDriver::run()
ARDRONE_TOOL_CONFIGURATION_ADDEVENT (detections_select_h, &detect_hori_type, NULL);
ARDRONE_TOOL_CONFIGURATION_ADDEVENT (enemy_colors, &detect_enemy_color, NULL );
ARDRONE_TOOL_CONFIGURATION_ADDEVENT (enemy_without_shell, &detect_indoor_hull, NULL);
// if (IS_ARDRONE2)
// {
// ARDRONE_TOOL_CONFIGURATION_ADDEVENT (bitrate_ctrl_mode, &vbcMode, NULL);
// ARDRONE_TOOL_CONFIGURATION_ADDEVENT (max_bitrate, &maxbitrate, NULL);
// }
}
}
if (current_frame_id != last_frame_id)
+14 -2
Ver Arquivo
@@ -14,6 +14,8 @@ ARDroneDriver* rosDriver;
int32_t should_exit;
extern "C" {
vp_stages_latency_estimation_config_t vlat;
DEFINE_THREAD_ROUTINE(update_ros, data)
{
@@ -50,7 +52,8 @@ extern "C" {
//TODO: Please FIX this to read default values from ros params and move them to ardrone driver
//Roadmap: We have the pointer to ARDroneDriver here, so it is doable to return back ros params
//using this class.
ardrone_application_default_config.bitrate_ctrl_mode = VBC_MODE_DYNAMIC;
// ardrone_application_default_config.bitrate_ctrl_mode = VBC_MANUAL;
// ardrone_application_default_config.bitrate = 4000;
ardrone_application_default_config.autonomous_flight = 0;
ardrone_application_default_config.control_level = (0 << CONTROL_LEVEL_COMBINED_YAW);
ardrone_application_default_config.outdoor = false;
@@ -63,7 +66,7 @@ extern "C" {
ardrone_application_default_config.control_yaw = (100.0 /180.0) * 3.1415;
ardrone_application_default_config.euler_angle_max = (12.0 / 180.0) * 3.1415;
ardrone_application_default_config.video_channel = ZAP_CHANNEL_HORI;
ardrone_application_default_config.navdata_demo = 0;
ardrone_application_default_config.navdata_demo = 1;
ardrone_tool_input_add(&teleop);
uint8_t post_stages_index = 0;
@@ -95,6 +98,15 @@ extern "C" {
driver_pre_stages->stages_list = NULL;
driver_post_stages->stages_list = (vp_api_io_stage_t*)vp_os_calloc(NB_DRIVER_POST_STAGES,sizeof(vp_api_io_stage_t));
//Fill the POST-stages------------------------------------------------------
// vp_os_memset (&vlat, 0x0, sizeof (vlat));
// vlat.state = (vp_stages_latency_estimation_state) 0;
// //vlat.last_decoded_frame_info= (void *)&vec;
// driver_post_stages->stages_list[post_stages_index].name = "LatencyEst";
// driver_post_stages->stages_list[post_stages_index].type = VP_API_FILTER_DECODER;
// driver_post_stages->stages_list[post_stages_index].cfg = (void *)&vlat;
// driver_post_stages->stages_list[post_stages_index++].funcs = vp_stages_latency_estimation_funcs;
driver_post_stages->stages_list[post_stages_index].name = "ExtractData";
driver_post_stages->stages_list[post_stages_index].type = VP_API_OUTPUT_SDL;
driver_post_stages->stages_list[post_stages_index].cfg = NULL;
+1
Ver Arquivo
@@ -32,6 +32,7 @@ extern "C" {
#include <ardrone_tool/Video/video_stage.h>
#include <ardrone_tool/Video/video_recorder_pipeline.h>
#include <ardrone_tool/Video/video_stage_latency_estimation.h>
extern video_decoder_config_t vec;
}