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
return ::armarx::skills::SkillDescription{
36
.
skillId
= {.
skillName
=
constants::MOVE_JOINTS_WITH_VELOCITY_SKILL_NAME
},
37
.description =
"Moves joints with a specific velocity using the KinematicUnit"
,
38
.timeout =
::armarx::Duration::Minutes
(1),
39
.parametersType = ParamType::ToAronType()};
40
}
41
42
MoveJointsWithVelocity
(
const
Services&);
43
44
45
private
:
46
::armarx::skills::Skill::MainResult
main
(
const
SpecializedMainInput& in)
override
;
47
::armarx::skills::Skill::ExitResult
exit
(
const
SpecializedExitInput& in)
override
;
48
49
std::map<std::string, float>
50
filterJointTargetValues(
const
NameValueMap
& jointsTargetValues,
51
const
std::vector<std::string>& disabledJoints)
const
;
52
53
void
switchControlMode(
const
NameValueMap
& jointsTargetValues,
54
const
armarx::ControlMode controlMode);
55
56
void
moveJoints(
const
NameValueMap
& jointsTargetValues,
57
const
armarx::core::time::Duration
& dur);
58
59
private
:
60
Services srv_;
61
};
62
63
}
// namespace armarx::control::skills::skills
armarx::skills::SkillID::skillName
std::string skillName
Definition:
SkillID.h:60
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:20
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:111
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition:
Skill.h:48
armarx::skills::Skill::ExitResult
A result struct for skill exit function.
Definition:
Skill.h:55
armarx::control::njoint_controller::platform::platform_follower_controller::NameValueMap
std::map< std::string, float > NameValueMap
Definition:
PlatformFollowerController.h:91
armarx::control::skills::skills::MoveJointsWithVelocity::MoveJointsWithVelocity
MoveJointsWithVelocity(const Services &)
Definition:
MoveJointsWithVelocity.cpp:8
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:17
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 Oct 12 2024 09:14:13 for armarx_documentation by
1.8.17