forked from paparazzi/paparazzi
-
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
Open
alfredoFBW
wants to merge
2
commits into
devel_rover_stop
Choose a base branch
from
3-fix-bug-regarding-integration-step-when-stopping-at-waypoints-in-gvf_parametric_bare
base: devel_rover_stop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ extern gvf_common_omega gvf_c_omega; | |
* @brief Different parameters obtained from gvfs. dot means d/dt | ||
* @param kappa is the curve's curvature | ||
* @param ori_err is the orientation error | ||
* #param ori_err_dot is the derivative of the orientation error | ||
*/ | ||
typedef struct{ | ||
float kappa; | ||
|
@@ -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 commentThe 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) |
||
|
||
#endif // GVF_COMMON_H | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,6 @@ | |
|
||
|
||
// Control | ||
uint32_t gvf_parametric_bare_t0 = 0; // We need it for calculting the time lapse delta_T | ||
uint32_t gvf_parametric_bare_splines_ctr = 0; // We need it for Bézier curves splines Telemetry | ||
gvf_parametric_bare_con gvf_parametric_bare_control; | ||
|
||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Importante, si no no se dibujan las curvas |
||
|
||
float wb = gvf_parametric_bare_control.w * gvf_parametric_bare_control.beta; | ||
|
||
|
@@ -73,7 +72,7 @@ static void send_gvf_parametric_bare(struct transport_tx *trans, struct link_dev | |
static void send_circle_parametric(struct transport_tx *trans, struct link_device *dev) | ||
{ | ||
uint32_t now = get_sys_time_msec(); | ||
uint32_t delta_T = now - gvf_parametric_bare_t0; | ||
uint32_t delta_T = now - gvf_c_t0; | ||
|
||
/* | ||
if (delta_T < 200) | ||
|
@@ -115,11 +114,14 @@ void gvf_parametric_bare_control_2D(float kx, float ky, float f1, float f2, floa | |
{ | ||
|
||
uint32_t now = get_sys_time_msec(); | ||
gvf_parametric_bare_control.delta_T = now - gvf_parametric_bare_t0; | ||
gvf_parametric_bare_t0 = now; | ||
|
||
if (gvf_parametric_bare_control.delta_T > 300) { // We need at least two iterations for Delta_T | ||
gvf_parametric_bare_control.w = 0; // Reset w since we assume the algorithm starts | ||
gvf_parametric_bare_control.delta_T = now - gvf_c_t0; | ||
gvf_c_t0 = now; | ||
|
||
// We need at least two iterations for Delta_T | ||
if (gvf_parametric_bare_control.delta_T > 300) | ||
{ | ||
/* Reset w since we assume the algorithm starts */ | ||
gvf_parametric_bare_control.w = 0; | ||
return; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.