-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtransforms.orogen
75 lines (59 loc) · 2.39 KB
/
transforms.orogen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# frozen_string_literal: true
name "transforms"
version "0.1"
import_types_from "transformsTypes.hpp"
import_types_from "std"
import_types_from "base"
# Task that changes the source frame of a pose and twist combination expressed
# as RigidBodyState
#
# This task changes the source frame of a RBS, keeping the target frame the same.
# It can for instance provide a body2world transform from a imu2world transform
# and a body2imu generated by the transformer
#
# The reference frame is immaterial to these transformations and therefore does not
# need to be provided
task_context "PoseAndTwistFrameChangeRBSTask" do
needs_configuration
# The pose+velocity of the source frame w.r.t. the reference frame
input_port "source2ref_samples", "/base/samples/RigidBodyState"
# The pose+velocity of the target frame w.r.t. the reference frame
output_port "target2ref_samples", "/base/samples/RigidBodyState"
transformer do
transform "source", "target"
align_port "source2ref_samples"
# Note: will have to be configured in the component's configuration file
max_latency 1
end
port_driven
end
# Task that changes the reference frame of a pose expressed as RigidBodyState
#
# This task changes the reference frame of a RBS, keeping the source frame the same.
task_context "PoseReferenceChangeRBSTask" do
needs_configuration
# The pose of the source frame w.r.t. the reference frame
input_port "source2ref_samples", "/base/samples/RigidBodyState"
# The pose of the source frame w.r.t. the new reference frame
output_port "source2new_ref_samples", "/base/samples/RigidBodyState"
transformer do
transform "new_ref", "ref"
align_port "source2ref_samples"
# Note: will have to be configured in the component's configuration file
max_latency 1
end
port_driven
end
# Task that takes two poses relative to a single reference and outputs the one
# relative to the other
#
# 'newref' is considered fixed in 'ref' for this calculation. That is, the
# linear velocity is rotated to match b's orientation, but the velocities are
# not combined
task_context "PoseCombinationRBSTask" do
needs_configuration
input_port "object2ref_pose", "/base/samples/RigidBodyState"
input_port "newref2ref_pose", "/base/samples/RigidBodyState"
output_port "object2newref_pose", "/base/samples/RigidBodyState"
port_driven
end