-
Notifications
You must be signed in to change notification settings - Fork 0
/
motors_roboteq_canopen.orogen
79 lines (59 loc) · 2.42 KB
/
motors_roboteq_canopen.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
# frozen_string_literal: true
name "motors_roboteq_canopen"
import_types_from "std"
import_types_from "base"
import_types_from "canbus"
import_types_from "canopen_master"
import_types_from "raw_io"
using_task_library "canopen_master"
using_library "motors_roboteq_canopen"
import_types_from "motors_roboteq_canopenTypes.hpp"
# Controller driver that uses Roboteq's own CANOpen dictionary
task_context "Task", subclasses: "canopen_master::SlaveTask" do
needs_configuration
# Channel configurations, starting at channel 0
#
# Channels with operation_mode set to OPERATION_MODE_NONE are ignored
property "channel_configurations",
"/std/vector</motors_roboteq_canopen/ChannelConfiguration>"
# Configuration parameters regarding receiving joint states
property "joint_state_settings",
"/canopen_master/PDOCommunicationParameters"
# Configuration of the analog inputs to be read
property "analog_input_configuration",
"/std/vector</motors_roboteq_canopen/AnalogInputConfiguration>"
# Configuration parameters regarding receiving analog readings
property "analog_input_settings",
"/canopen_master/PDOCommunicationParameters"
# The desired commands
input_port "joint_cmd", "/base/commands/Joints"
# The joint state
output_port "joint_samples", "/base/samples/Joints"
# The analog inputs
output_port "analog_inputs", "/std/vector</raw_io/Analog>"
port_driven :can_in, :joint_cmd
end
# Controller driver that uses the DS402 profile
#
# As of firmware 2.0, this **does not work**
task_context "DS402Task", subclasses: "canopen_master::SlaveTask" do
needs_configuration
# Channel configurations, starting at channel 0
#
# Channels with operation_mode set to OPERATION_MODE_NONE are ignored
property "channel_configurations",
"/std/vector</motors_roboteq_canopen/DS402ChannelConfiguration>"
# Configuration parameters regarding receiving joint states
property "joint_state_settings",
"/canopen_master/PDOCommunicationParameters"
# How long the component will wait for a state change before it times out
#
# The default is 1s
property "state_change_timeout",
"/base/Time"
# The desired commands
input_port "joint_cmd", "/base/commands/Joints"
# The joint state
output_port "joint_samples", "/base/samples/Joints"
port_driven :can_in, :joint_cmd
end