-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed error of a big integration step when vehicle stopped in gvf_par… #4
base: devel_rover_stop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estamos pensando dos cosas:
- Creemos que la línea 142 de tu gvf_parametric_bare.c no es necesaria, siempre que se esté trabajando en modo paradas en WP hay que recalcular el delta_T ¿no?
- Tal vez podría cambiarse la asignación del delta_T de 1s por algo más flexible. Por ejemeplo podríamos reescribir el tiempo gvf_parametric_bare_t0 (habria que ponerla como global) cuando nos salimos de una parada, por ejemplo en la función increase_bz_pointer de gvf.c. ¿Cómo lo ves?
|
sw/airborne/modules/guidance/gvf_parametric_bare/gvf_parametric_bare.c
Outdated
Show resolved
Hide resolved
sw/airborne/modules/guidance/gvf_parametric_bare/gvf_parametric_bare.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Añadidos los cambios para introducir variable global.
@@ -392,7 +392,8 @@ bool rover_guidance_bearing_static_ctrl(void) | |||
guidance_control.cmd.speed = 0.0; | |||
guidance_control.cmd.delta = 0.0; | |||
//guidance_control.throttle = BoundThrottle(0.0); | |||
|
|||
/* Obtain current cpu time when in static control */ | |||
gvf_c_t0 = get_sys_time_msec(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esta actualización no puede ser en increase_bz_pointer()
, dado que se le llama una sola vez en el bloque de navegación del flight_plan.xml <call_once fun=" increase_bz_pointer()"/>
. Tiene que ser aquí pues es donde se ejecuta.
@@ -59,6 +60,8 @@ typedef struct{ | |||
|
|||
extern gvf_common_params gvf_c_info; | |||
extern gvf_common_stop_at_wp gvf_c_stopwp; | |||
/* @ brief Variable to keep the current cpu time in gvf calls */ | |||
extern uint32_t gvf_c_t0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Añadida variable global de tiempo cpu actual para llamadas gvf (actualmente solo usado para paramétrico)
@@ -58,7 +57,7 @@ static void send_gvf_parametric_bare(struct transport_tx *trans, struct link_dev | |||
uint8_t traj_type = (uint8_t)gvf_parametric_bare_trajectory.type; | |||
|
|||
uint32_t now = get_sys_time_msec(); | |||
uint32_t delta_T = now - gvf_parametric_bare_t0; | |||
uint32_t delta_T = now - gvf_c_t0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importante, si no no se dibujan las curvas
…ametric_bare.
Closes #3