MoveJointsWithVelocity.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <RobotAPI/interface/units/KinematicUnitInterface.h>
4
#include <
RobotAPI/libraries/armem/client/MemoryNameSystem.h
>
5
#include <
RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotReader.h
>
6
#include <
RobotAPI/libraries/skills/provider/SimpleSpecializedSkill.h
>
7
8
#include <armarx/control/skills/aron/MoveJointsWithVelocityParams.aron.generated.h>
9
#include <
armarx/control/skills/constants/constants.h
>
10
11
namespace
armarx::control::skills::skills
12
{
13
14
/**
15
* @class MoveJoints
16
* @brief MoveJoints-skill to move joints to specified target values using the KinematicUnit
17
*
18
* Sets joint values with the KinematicUnit and waits until target values are reached. Can
19
* simulate trajectory when in simulation (otherwise trajectories from joint value updates through
20
* the KinematicUnit are not simulated).
21
*/
22
class
MoveJointsWithVelocity
:
23
public
::armarx::skills::SimpleSpecializedSkill
<arondto::MoveJointsWithVelocityParams>
24
{
25
26
public
:
27
struct
Services
28
{
29
::armarx::KinematicUnitInterfacePrx
kinematicUnit
;
30
};
31
32
static ::armarx::skills::SkillDescription
33
GetSkillDescription
()
34
{
35
ParamType
defaultParameters;
36
// TODO(): set parameter defaults
37
38
return ::armarx::skills::SkillDescription{
39
.
skillId
= {.
skillName
=
constants::MOVE_JOINTS_WITH_VELOCITY_SKILL_NAME
},
40
.description =
"Moves joints with a specific velocity using the KinematicUnit"
,
41
.rootProfileDefaults = defaultParameters.toAron(),
42
.timeout =
::armarx::Duration::Minutes
(1),
43
.parametersType = ParamType::ToAronType()};
44
}
45
46
MoveJointsWithVelocity
(
const
Services&);
47
48
49
private
:
50
using
Base::exit
;
51
using
Base::main
;
52
53
::armarx::skills::Skill::MainResult
main
(
const
SpecializedMainInput& in)
override
;
54
::armarx::skills::Skill::ExitResult
exit
(
const
SpecializedExitInput& in)
override
;
55
56
std::map<std::string, float>
57
filterJointTargetValues(
const
NameValueMap
& jointsTargetValues,
58
const
std::vector<std::string>& disabledJoints)
const
;
59
60
void
switchControlMode(
const
NameValueMap
& jointsTargetValues,
61
const
armarx::ControlMode controlMode);
62
63
void
moveJoints(
const
NameValueMap
& jointsTargetValues,
64
const
armarx::core::time::Duration
& dur);
65
66
private
:
67
Services srv_;
68
};
69
70
}
// namespace armarx::control::skills::skills
armarx::skills::SimpleSpecializedSkill< arondto::MoveJointsWithVelocityParams >::ParamType
arondto::MoveJointsWithVelocityParams ParamType
Definition:
SimpleSpecializedSkill.h:14
armarx::skills::SkillID::skillName
std::string skillName
Definition:
SkillID.h:41
armarx::control::skills::skills::MoveJointsWithVelocity::Services
Definition:
MoveJointsWithVelocity.h:27
armarx::control::skills::skills::MoveJointsWithVelocity::Services::kinematicUnit
::armarx::KinematicUnitInterfacePrx kinematicUnit
Definition:
MoveJointsWithVelocity.h:29
SimpleSpecializedSkill.h
armarx::skills::SimpleSpecializedSkill< arondto::MoveJointsWithVelocityParams >::exit
Skill::ExitResult exit() final
Definition:
SimpleSpecializedSkill.h:81
constants.h
armarx::control::skills::skills::MoveJointsWithVelocity
Definition:
MoveJointsWithVelocity.h:22
armarx::control::skills::skills::MoveJointsWithVelocity::GetSkillDescription
::armarx::skills::SkillDescription GetSkillDescription()
Definition:
MoveJointsWithVelocity.h:33
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition:
SkillDescription.h:19
armarx::skills::SimpleSpecializedSkill
Definition:
SimpleSpecializedSkill.h:10
VirtualRobotReader.h
armarx::core::time::Duration::Minutes
static Duration Minutes(std::int64_t minutes)
Constructs a duration in minutes.
Definition:
Duration.cpp:96
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition:
Skill.h:39
armarx::skills::Skill::ExitResult
A result struct for skill exit function.
Definition:
Skill.h:46
armarx::skills::Skill::exit
virtual ExitResult exit()
Override this method with the actual implementation.
Definition:
Skill.cpp:451
armarx::control::njoint_controller::platform::platform_follower_controller::NameValueMap
std::map< std::string, float > NameValueMap
Definition:
PlatformFollowerController.h:88
armarx::control::skills::skills::MoveJointsWithVelocity::MoveJointsWithVelocity
MoveJointsWithVelocity(const Services &)
Definition:
MoveJointsWithVelocity.cpp:10
armarx::skills::SimpleSpecializedSkill< arondto::MoveJointsWithVelocityParams >::main
Skill::MainResult main() final
Definition:
SimpleSpecializedSkill.h:71
armarx::control::skills::skills
Definition:
ExecuteTrajectory.cpp:18
armarx::core::time::Duration
Represents a duration.
Definition:
Duration.h:16
armarx::skills::Skill::main
virtual MainResult main()
Override this method with the actual implementation. The callback is for status updates to the callin...
Definition:
Skill.cpp:458
MemoryNameSystem.h
armarx::control::skills::constants::MOVE_JOINTS_WITH_VELOCITY_SKILL_NAME
std::string MOVE_JOINTS_WITH_VELOCITY_SKILL_NAME
Definition:
constants.cpp:9
armarx
control
skills
skills
MoveJointsWithVelocity.h
Generated on Sat Mar 29 2025 09:17:33 for armarx_documentation by
1.8.17