model_position.c File Reference
#include <sys/time.h>
#include <math.h>
#include <stdlib.h>
#include "stage_internal.h"
#include "gui.h"
Function Documentation
double drand48 | ( | ) |
Referenced by gauss_rand(), and position_init().
void gauss_rand | ( | double * | y1, | |
double * | y2 | |||
) |
void position_init | ( | stg_model_t * | mod | ) |
References stg_pose_t::a, drand48(), stg_position_cfg_t::drive_mode, FALSE, stg_position_data_t::integration_bias, stg_position_data_t::integration_error, stg_position_data_t::localization, stg_position_cmd_t::mode, position_load(), position_render_data(), position_render_text(), position_shutdown(), position_startup(), position_unrender_data(), position_unrender_text(), position_update(), stg_model_add_property_toggles(), stg_model_set_blob_return(), stg_model_set_cfg(), stg_model_set_cmd(), stg_model_set_data(), stg_model_set_velocity(), STG_POSITION_CONTROL_DEFAULT, STG_POSITION_DRIVE_DEFAULT, STG_POSITION_INTEGRATION_BIAS_MAX_A, STG_POSITION_INTEGRATION_BIAS_MAX_X, STG_POSITION_INTEGRATION_BIAS_MAX_Y, STG_POSITION_INTEGRATION_ERROR_A, STG_POSITION_INTEGRATION_ERROR_X, STG_POSITION_INTEGRATION_ERROR_Y, STG_POSITION_LOCALIZATION_DEFAULT, TRUE, stg_position_data_t::watchdog_timeout, stg_position_data_t::wheelbase, stg_pose_t::x, and stg_pose_t::y.
void position_load | ( | stg_model_t * | mod | ) |
References stg_pose_t::a, stg_position_data_t::integration_bias, stg_position_data_t::integration_error, stg_position_data_t::localization, stg_position_data_t::max_speed, model_change(), NORMALIZE, stg_position_data_t::origin, stg_position_data_t::pose, stg_position_data_t::pose_error, PRINT_ERR1, PRINT_ERR2, PRINT_WARN1, stg_model_get_global_pose(), STG_POSITION_DRIVE_CAR, STG_POSITION_DRIVE_DIFFERENTIAL, STG_POSITION_DRIVE_OMNI, STG_POSITION_LOCALIZATION_GPS, STG_POSITION_LOCALIZATION_ODOM, stg_position_data_t::watchdog_timeout, wf_property_exists(), wf_read_float(), wf_read_string(), wf_read_tuple_angle(), wf_read_tuple_length(), wf_tuple_count(), stg_position_data_t::wheelbase, stg_pose_t::x, and stg_pose_t::y.
Referenced by position_init().
int position_render_data | ( | stg_model_t * | mod, | |
void * | userp | |||
) |
References stg_pose_t::a, stg_position_data_t::origin, stg_position_data_t::pose, STG_LAYER_POSITIONDATA, stg_model_fig_create(), stg_model_get_fig(), stg_rtk_fig_arrow(), stg_rtk_fig_clear(), stg_rtk_fig_color_rgb32(), stg_rtk_fig_line(), stg_rtk_fig_origin(), stg_rtk_fig_rectangle(), stg_pose_t::x, and stg_pose_t::y.
Referenced by position_init().
int position_render_text | ( | stg_model_t * | mod, | |
void * | userp | |||
) |
References stg_pose_t::a, stg_position_data_t::localization, stg_position_data_t::pose, STG_LAYER_POSITIONDATA, stg_model_fig_create(), stg_model_get_fig(), STG_POSITION_LOCALIZATION_GPS, stg_rtk_fig_clear(), stg_rtk_fig_color_rgb32(), stg_rtk_fig_text(), stg_pose_t::x, and stg_pose_t::y.
Referenced by position_init().
int position_shutdown | ( | stg_model_t * | mod | ) |
References PRINT_DEBUG, stg_model_set_cmd(), stg_model_set_velocity(), and stg_model_set_watts().
Referenced by position_init().
int position_startup | ( | stg_model_t * | mod | ) |
References PRINT_DEBUG, stg_model_set_watts(), and STG_POSITION_WATTS.
Referenced by position_init().
int position_unrender_data | ( | stg_model_t * | mod, | |
void * | userp | |||
) |
int position_unrender_text | ( | stg_model_t * | mod, | |
void * | userp | |||
) |
int position_update | ( | stg_model_t * | mod | ) |
References _model_update(), stg_pose_t::a, stg_position_cfg_t::drive_mode, gauss_rand(), stg_position_data_t::integration_bias, stg_position_data_t::integration_error, stg_position_data_t::localization, M_PI, stg_position_data_t::max_speed, model_change(), NORMALIZE, stg_position_data_t::origin, stg_position_data_t::pose, PRINT_DEBUG, PRINT_DEBUG1, PRINT_DEBUG2, PRINT_DEBUG3, PRINT_DEBUG4, PRINT_ERR1, PRINT_ERR2, stg_model_get_global_pose(), STG_POSITION_CONTROL_POSITION, STG_POSITION_CONTROL_VELOCITY, STG_POSITION_CONTROL_VELOCITY_HEADING, STG_POSITION_DRIVE_CAR, STG_POSITION_DRIVE_DIFFERENTIAL, STG_POSITION_DRIVE_OMNI, STG_POSITION_LOCALIZATION_GPS, STG_POSITION_LOCALIZATION_ODOM, stg_position_data_t::wheelbase, stg_pose_t::x, and stg_pose_t::y.
Referenced by position_init().
void stg_model_position_get_odom | ( | stg_model_t * | mod, | |
stg_pose_t * | odom | |||
) |
void stg_model_position_odom_reset | ( | stg_model_t * | mod | ) |
stg_model_t* stg_model_test_collision_at_pose | ( | stg_model_t * | mod, | |
stg_pose_t * | pose, | |||
double * | hitx, | |||
double * | hity | |||
) |
Variable Documentation
const double STG_POSITION_INTEGRATION_BIAS_MAX_A = 0.05 |
Referenced by position_init().
const double STG_POSITION_INTEGRATION_BIAS_MAX_X = 0.03 |
Referenced by position_init().
const double STG_POSITION_INTEGRATION_BIAS_MAX_Y = 0.03 |
Referenced by position_init().
const double STG_POSITION_INTEGRATION_ERROR_A = 0.05 |
Referenced by position_init().
const double STG_POSITION_INTEGRATION_ERROR_X = 0.03 |
Referenced by position_init().
const double STG_POSITION_INTEGRATION_ERROR_Y = 0.03 |
Referenced by position_init().
const double STG_POSITION_WATTS = 2.0 |
Referenced by position_startup().
const double STG_POSITION_WATTS_KGMS = 5.0 |
Generated on Wed Jun 3 23:12:29 2009 for Stage by
