-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtut_follower.orogen
31 lines (24 loc) · 980 Bytes
/
tut_follower.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
name "tut_follower"
using_library 'motor_controller'
# To get the PIDSettings class and export is as property
import_types_from "motor_controller/PID.hpp"
# Get the base types
import_types_from "base"
# And get the debug type
import_types_from "FollowerTypes.hpp"
import_types_from 'tut_sensor'
task_context "Task" do
# The parameters of the distance controller (which controls speed)
property "pid_distance", "/motor_controller/PIDSettings"
# The parameters of the heading controller (which controls direction)
property "pid_heading", "/motor_controller/PIDSettings"
# The distance at which we should follow our target
property "desired_distance", "double", 0
# Bearing and distance to our target
input_port "bearing_distance", "/rock_tutorial/BearingDistanceSensor"
# The command
output_port "cmd", "/base/commands/Motion2D"
output_port "debug", "tut_follower/Debug"
# Update when we get a new position
port_driven
end