Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
2b509796
Commit
2b509796
authored
7 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Add JointControllerTemplate (it is templated on the control target and implements getControlTarget)
parent
05894913
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/units/RobotUnit/JointControllers/JointController.h
+18
-0
18 additions, 0 deletions
...onents/units/RobotUnit/JointControllers/JointController.h
with
18 additions
and
0 deletions
source/RobotAPI/components/units/RobotUnit/JointControllers/JointController.h
+
18
−
0
View file @
2b509796
...
...
@@ -75,6 +75,18 @@ namespace armarx
void
rtActivate
();
void
rtDeactivate
();
};
template
<
class
ControlTargetType
>
class
JointControllerTemplate
:
public
virtual
JointController
{
static_assert
(
std
::
is_base_of
<
ControlTargetBase
,
ControlTargetType
>::
value
,
"ControlTargetType has to inherit SensorValueBase"
);
public:
using
JointController
::
JointController
;
virtual
ControlTargetType
*
getControlTarget
()
final
;
ControlTargetType
controlTarget
;
};
}
//inline functions
...
...
@@ -152,5 +164,11 @@ namespace armarx
rtPostDeactivateController
();
rtResetTarget
();
}
template
<
class
ControlTargetType
>
inline
ControlTargetType
*
JointControllerTemplate
<
ControlTargetType
>::
getControlTarget
()
{
return
&
controlTarget
;
}
}
#endif
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