-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviso2.orogen
121 lines (96 loc) · 5.07 KB
/
viso2.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name "viso2"
# Optionally declare the version number
# version "0.1"
# If new data types need to be defined, they have to be put in a separate C++
# header, and this header will be loaded here
import_types_from "base"
import_types_from "frame_helper/Calibration.h"
import_types_from "frame_helper/FrameHelperTypes.h"
import_types_from "viso2Types.hpp"
# Finally, it is pretty common that headers are directly loaded from an external
# library. In this case, the library must be first used (the name is the
# library's pkg-config name) and then the header can be used. Following Rock
# conventions, a common use-case would be:
using_library "opencv"
using_library "frame_helper"
using_library "viso2"
# If this project uses data types that are defined in other oroGen projects,
# these projects should be imported there as well.
# import_types_from "base"
# Declare a new task context (i.e., a component)
#
# The corresponding C++ class can be edited in tasks/Task.hpp and
# tasks/Task.cpp, and will be put in the viso2 namespace.
task_context "StereoOdometer" do
# This is the default from now on, and should not be removed. Rock will
# transition to a setup where all components use a configuration step.
needs_configuration
#**************************
#**** Task Properties *****
#**************************
property("calib_parameters","frame_helper/StereoCalibration").
doc 'Intrinsic and extrinsic camera calibration parameters'+
'for a full parameter list have a look at frame_helper'
property("viso2_parameters", 'viso2/StereoOdometerParameters').
doc 'Visual Odometry Stereo parameters'+
'for a full parameter list have a look at viso2Types.hpp'+
'and at viso_stereo.h of the viso2 library.'
property("resize_algorithm","/frame_helper/ResizeAlgorithm",:INTER_LINEAR).
doc "resize algorithm which is used to scale the frame before it is written to the output port. "
"allowed values are INTER_LINEAR, INTER_NEAREST, INTER_AREA, INTER_CUBIC, INTER_LANCZOS4, BAYER_RESIZE."
property('visual_odometry_source_frame', '/std/string').doc 'From Frame at previous instance time for the transformer'
property('visual_odometry_target_frame', '/std/string').doc 'To Frame at next instance time for the transformer'
property('delta_visual_odometry_source_frame', '/std/string').doc 'From Frame at previous instance time for the transformer'
property('delta_visual_odometry_target_frame', '/std/string').doc 'To Frame at next instance time for the transformer'
#******************************
#******* Input ports *********
#******************************
input_port("left_frame", ro_ptr('base::samples::frame::Frame')).
doc 'Left camera frame.'
input_port("right_frame", ro_ptr('base::samples::frame::Frame')).
doc 'Right camera frame.'
#******************************
#******* Transformer *********
#******************************
transformer do
transform "left_camera", "body" # left_camera to body in "Source in target" convention
align_port("left_frame", 0.5)
align_port("right_frame", 0.5)
max_latency(1.0)
end
# An output port, i.e. an object to which the component pushes data so that
# it is transmitted to other components' inputs
#
# Data can be written using _output.write(value). _output.connected() returns
# if this output is connected to an input or not.
#******************************
#******* Output Ports *********
#******************************
output_port("pose_samples_out", "/base/samples/RigidBodyState").
doc "Estimated pose in body frame. Tbody0_bodyk"
output_port("delta_pose_samples_out", "/base/samples/RigidBodyState").
doc "Delta estimated pose in body frame. Tbodyk-1_bodyk"
output_port("point_cloud_uncertainty_out", "std::vector<base::Matrix3d>").
doc "One-Sigma uncertainty variance for the 3D features. Rk"
output_port("point_cloud_samples_out", 'base::samples::Pointcloud').
doc 'Point Cloud representation of the 3D features.'
output_port("point_cloud_indexes_out", "std::vector<unsigned int>").
doc "Indexes with respect to the previous -> next features."
output_port("delta_pose_jacobians_k_out", "base::MatrixXd").
doc "Jacobian of previous 3D images features. J^k_{k,k+m}"
output_port("delta_pose_jacobians_k_m_out", "base::MatrixXd").
doc "Jacobian of current 3D images features. J^k+m_{k,k+m}"
output_port('viso2_info', 'viso2/Viso2Info').
doc 'Visual Odometry extra information port.'
#******************************
#******* Debug Ports **********
#******************************
property('output_debug', 'bool', false).
doc 'Set to true if output debug information is desirable.'
property('image_ouput_type', 'viso2::IMAGE_OUTPUT_TYPE').
doc 'Image output type.'
output_port("frame_samples_out", ro_ptr('base::samples::frame::Frame')).
doc 'Intra (Left - Right) frame correspondences image.'+
'Inter (Keypoints) in the image.'
port_driven
end