Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
7073187a
Commit
7073187a
authored
6 years ago
by
bresch
Committed by
Roman Bapst
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Trajectory - Add getters for current position and velocity. Move some getters to public section
parent
6a7ce651
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp
+1
-0
1 addition, 0 deletions
src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp
src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.hpp
+4
-1
4 additions, 1 deletion
src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.hpp
with
5 additions
and
1 deletion
src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.cpp
+
1
−
0
View file @
7073187a
...
...
@@ -237,6 +237,7 @@ void VelocitySmoothing::integrate(float &accel_setpoint_smooth, float &vel_setpo
_accel
=
accel_new
;
_vel
=
vel_new
;
_pos
=
pos_new
;
/* set output variables */
accel_setpoint_smooth
=
_accel
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/FlightTasks/tasks/Utility/VelocitySmoothing.hpp
+
4
−
1
View file @
7073187a
...
...
@@ -94,7 +94,9 @@ public:
void
setMaxVel
(
float
max_vel
)
{
_max_vel
=
max_vel
;
}
void
setCurrentVelocity
(
const
float
vel
)
{
_vel
=
vel
;
}
float
getCurrentVelocity
()
const
{
return
_vel
;
}
void
setCurrentPosition
(
const
float
pos
)
{
_pos
=
pos
;
}
float
getCurrentPosition
()
const
{
return
_pos
;
}
/**
* Synchronize several trajectories to have the same total time. This is required to generate
...
...
@@ -105,10 +107,11 @@ public:
*/
static
void
timeSynchronization
(
VelocitySmoothing
*
traj
,
int
n_traj
);
private
:
float
getTotalTime
()
const
{
return
_T1
+
_T2
+
_T3
;
}
float
getVelSp
()
const
{
return
_vel_sp
;
}
private
:
/**
* Compute T1, T2, T3 depending on the current state and velocity setpoint.
* @param T123 optional parameter. If set, the total trajectory time will be T123, if not,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment