-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotors_weg_cvw300.orogen
96 lines (73 loc) · 3.27 KB
/
motors_weg_cvw300.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
# frozen_string_literal: true
name "motors_weg_cvw300"
import_types_from "std"
import_types_from "base"
using_library "motors_weg_cvw300"
import_types_from "motors_weg_cvw300/Configuration.hpp"
import_types_from "motors_weg_cvw300/InverterTemperatures.hpp"
import_types_from "motors_weg_cvw300/FaultState.hpp"
import_types_from "motors_weg_cvw300Types.hpp"
using_task_library "iodrivers_base"
using_library "control_base"
import_types_from "control_base"
task_context "Task", subclasses: "iodrivers_base::Task" do
needs_configuration
# The device address on the RS485 bus
property "address", "int", 1
# Whether to invert command and feedback w.r.t. the controller's direction
property "inverted", "/bool", false
# Update period for the temperature output
property "temperature_period", "/base/Time"
# Configure the internal watchdog
#
# This has two functions. The first one is to configure the
# controller to enter an alarm state if it does not receive
# data from the serial port (and how it should react when this happens).
#
# The second function is to make the component actively send a zero
# velocity command if no command is received within the watchdog timeout
#
# Set the watchdog timer to zero to disable
property "watchdog", "/motors_weg_cvw300/configuration/SerialWatchdog"
# Acceleration and deceleration ramps
property "ramps", "/motors_weg_cvw300/configuration/Ramps"
# How the motor is being controlled
property "control_type",
"/motors_weg_cvw300/configuration/ControlType", :CONTROL_ENCODER
# Modbus interframe delay
#
# The default value (20ms) is way bigger than the modbus-mandated standard
# (~ 1ms at 57600 bauds). It is however known to work for non-realtime,
# USB-wiedling setups. Tune this to lower values if you have a better
# setup (and know what you are doing)
property "modbus_interframe_delay", "/base/Time"
# Control limits
#
# You may only set the speed and effort fields. Setting any other field
# will fail on configure
#
# If set, min and max speeds need to be the opposite of each other. The
# controller does not support limiting them separately
property "limits", "/base/JointLimits"
# Registers configuration
#
# The list of registers with their respective values to perform the initial
# configuration of the engines.
property "registers_configuration",
"/std/vector</motors_weg_cvw300/configuration/MotorRegister>"
# Input command
#
# Only set the speed field
input_port "cmd_in", "/base/commands/Joints"
output_port "joint_samples", "/base/samples/Joints"
output_port "temperatures", "/motors_weg_cvw300/InverterTemperatures"
output_port "inverter_state", "/motors_weg_cvw300/InverterState"
output_port "alarm_state", "/motors_weg_cvw300/AlarmState"
output_port "fault_state", "/motors_weg_cvw300/FaultState"
output_port "saturation_signal", "/control_base/SaturationSignal"
exception_states "INVALID_COMMAND_SIZE", "INVALID_COMMAND_PARAMETER"
error_states "CONTROLLER_FAULT", "CONTROLLER_UNDER_VOLTAGE"
# There's no data coming from the controller without the driver requesting
# it first ... Must be periodic.
periodic 0.1
end