diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3008a04 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.5) +project(fcat_msgs) + +# Default to C99 +if(NOT CMAKE_C_STANDARD) + set(CMAKE_C_STANDARD 99) +endif() + +# Default to C++14 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) +endif() + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +# find dependencies +find_package(ament_cmake REQUIRED) +find_package(builtin_interfaces REQUIRED) +find_package(rosidl_default_generators REQUIRED) + +set(msg_files + "msg/ActuatorCalibrateCmd.msg" + "msg/ActuatorCspCmd.msg" + "msg/ActuatorCstCmd.msg" + "msg/ActuatorCsvCmd.msg" + "msg/ActuatorProfPosCmd.msg" + "msg/ActuatorProfTorqueCmd.msg" + "msg/ActuatorProfVelCmd.msg" + "msg/ActuatorSetOutputPositionCmd.msg" + "msg/ActuatorState.msg" + "msg/ActuatorStates.msg" + "msg/CommanderDisableCmd.msg" + "msg/CommanderEnableCmd.msg" + "msg/CommanderState.msg" + "msg/CommanderStates.msg" + "msg/ConditionalState.msg" + "msg/ConditionalStates.msg" + "msg/EgdCspCmd.msg" + "msg/EgdCstCmd.msg" + "msg/EgdCsvCmd.msg" + "msg/EgdState.msg" + "msg/EgdStates.msg" + "msg/El2124State.msg" + "msg/El2124States.msg" + "msg/El2124WriteAllChannelsCmd.msg" + "msg/El2124WriteChannelCmd.msg" + "msg/El3208State.msg" + "msg/El3208States.msg" + "msg/El3602State.msg" + "msg/El3602States.msg" + "msg/FaulterEnableCmd.msg" + "msg/FaulterState.msg" + "msg/FaulterStates.msg" + "msg/FilterState.msg" + "msg/FilterStates.msg" + "msg/FtsTareCmd.msg" + "msg/FunctionState.msg" + "msg/FunctionStates.msg" + "msg/JedSetCmdValueCmd.msg" + "msg/JedState.msg" + "msg/JedStates.msg" + "msg/ModuleState.msg" + "msg/PidActivateCmd.msg" + "msg/PidState.msg" + "msg/PidStates.msg" + "msg/SaturationState.msg" + "msg/SaturationStates.msg" + "msg/SchmittTriggerState.msg" + "msg/SchmittTriggerStates.msg" + "msg/SignalGeneratorState.msg" + "msg/SignalGeneratorStates.msg" + ) + +set(srv_files + "srv/ActuatorCalibrateCmd.srv" + "srv/ActuatorProfPosCmd.srv" + "srv/ActuatorProfTorqueCmd.srv" + "srv/ActuatorProfVelCmd.srv" + "srv/PidActivateCmd.srv" + ) + + +rosidl_generate_interfaces(fcat_msgs + ${msg_files} + ${srv_files} + DEPENDENCIES builtin_interfaces + ) +#install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION include/${PROJECT_NAME} +# ) + +ament_export_dependencies(rosidl_default_runtime) + +ament_package() diff --git a/License.md b/License.md new file mode 100644 index 0000000..8d7def2 --- /dev/null +++ b/License.md @@ -0,0 +1,9 @@ +Copyright (c) 2021, California Institute of Technology. +All rights reserved. Based on Government Sponsored Research under contracts NNN12AA01C, NAS7-1407 and/or NAS7-03001. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. Neither the name of the California Institute of Technology (Caltech), its operating division the Jet Propulsion Laboratory (JPL), the National Aeronautics and Space Administration (NASA), nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CALIFORNIA INSTITUTE OF TECHNOLOGY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/msg/ActuatorCalibrateCmd.msg b/msg/ActuatorCalibrateCmd.msg new file mode 100644 index 0000000..33c8630 --- /dev/null +++ b/msg/ActuatorCalibrateCmd.msg @@ -0,0 +1,4 @@ +string name +float64 velocity +float64 accel +float64 max_current diff --git a/msg/ActuatorCspCmd.msg b/msg/ActuatorCspCmd.msg new file mode 100644 index 0000000..2b30740 --- /dev/null +++ b/msg/ActuatorCspCmd.msg @@ -0,0 +1,5 @@ +string name +float64 target_position +float64 position_offset +float64 velocity_offset +float64 torque_offset_amps diff --git a/msg/ActuatorCstCmd.msg b/msg/ActuatorCstCmd.msg new file mode 100644 index 0000000..b2718ca --- /dev/null +++ b/msg/ActuatorCstCmd.msg @@ -0,0 +1,3 @@ +string name +float64 target_torque_amps +float64 torque_offset_amps diff --git a/msg/ActuatorCsvCmd.msg b/msg/ActuatorCsvCmd.msg new file mode 100644 index 0000000..a7c5335 --- /dev/null +++ b/msg/ActuatorCsvCmd.msg @@ -0,0 +1,4 @@ +string name +float64 target_velocity +float64 velocity_offset +float64 torque_offset_amps diff --git a/msg/ActuatorProfPosCmd.msg b/msg/ActuatorProfPosCmd.msg new file mode 100644 index 0000000..6e7bf9c --- /dev/null +++ b/msg/ActuatorProfPosCmd.msg @@ -0,0 +1,5 @@ +string name +float64 target_position +float64 profile_velocity +float64 profile_accel +uint8 relative diff --git a/msg/ActuatorProfTorqueCmd.msg b/msg/ActuatorProfTorqueCmd.msg new file mode 100644 index 0000000..268837d --- /dev/null +++ b/msg/ActuatorProfTorqueCmd.msg @@ -0,0 +1,3 @@ +string name +float64 target_torque_amps +float64 max_duration diff --git a/msg/ActuatorProfVelCmd.msg b/msg/ActuatorProfVelCmd.msg new file mode 100644 index 0000000..5ba58f1 --- /dev/null +++ b/msg/ActuatorProfVelCmd.msg @@ -0,0 +1,4 @@ +string name +float64 target_velocity +float64 profile_accel +float64 max_duration diff --git a/msg/ActuatorSetOutputPositionCmd.msg b/msg/ActuatorSetOutputPositionCmd.msg new file mode 100644 index 0000000..306b7b2 --- /dev/null +++ b/msg/ActuatorSetOutputPositionCmd.msg @@ -0,0 +1,2 @@ +string name +float64 position diff --git a/msg/ActuatorState.msg b/msg/ActuatorState.msg new file mode 100644 index 0000000..39caa47 --- /dev/null +++ b/msg/ActuatorState.msg @@ -0,0 +1,20 @@ +float64 actual_position +float64 actual_velocity +float64 actual_current +bool faulted +float64 cmd_position +float64 cmd_velocity +float64 cmd_current +float64 cmd_max_current +uint8 egd_state_machine_state +uint8 egd_mode_of_operation +uint8 sto_engaged +uint8 hall_state +uint8 target_reached +uint8 motor_on +uint8 fault_code +float64 bus_voltage +uint32 drive_temperature +int32 egd_actual_position +int32 egd_cmd_position +uint8 actuator_state_machine_state diff --git a/msg/ActuatorStates.msg b/msg/ActuatorStates.msg new file mode 100644 index 0000000..92a2298 --- /dev/null +++ b/msg/ActuatorStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/ActuatorState[] states diff --git a/msg/CommanderDisableCmd.msg b/msg/CommanderDisableCmd.msg new file mode 100644 index 0000000..42f2bc1 --- /dev/null +++ b/msg/CommanderDisableCmd.msg @@ -0,0 +1 @@ +string name diff --git a/msg/CommanderEnableCmd.msg b/msg/CommanderEnableCmd.msg new file mode 100644 index 0000000..84025f3 --- /dev/null +++ b/msg/CommanderEnableCmd.msg @@ -0,0 +1,2 @@ +string name +float64 duration diff --git a/msg/CommanderState.msg b/msg/CommanderState.msg new file mode 100644 index 0000000..305a6f8 --- /dev/null +++ b/msg/CommanderState.msg @@ -0,0 +1 @@ +bool enable diff --git a/msg/CommanderStates.msg b/msg/CommanderStates.msg new file mode 100644 index 0000000..80827e9 --- /dev/null +++ b/msg/CommanderStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/CommanderState[] states diff --git a/msg/ConditionalState.msg b/msg/ConditionalState.msg new file mode 100644 index 0000000..8f8d145 --- /dev/null +++ b/msg/ConditionalState.msg @@ -0,0 +1 @@ +bool output diff --git a/msg/ConditionalStates.msg b/msg/ConditionalStates.msg new file mode 100644 index 0000000..3ef93a2 --- /dev/null +++ b/msg/ConditionalStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/ConditionalState[] states diff --git a/msg/EgdCspCmd.msg b/msg/EgdCspCmd.msg new file mode 100644 index 0000000..3077a58 --- /dev/null +++ b/msg/EgdCspCmd.msg @@ -0,0 +1,5 @@ +string name +int32 target_position +int32 position_offset +int32 velocity_offset +float64 torque_offset_amps diff --git a/msg/EgdCstCmd.msg b/msg/EgdCstCmd.msg new file mode 100644 index 0000000..2c333a3 --- /dev/null +++ b/msg/EgdCstCmd.msg @@ -0,0 +1,3 @@ +string name +int32 target_torque_amps +float64 torque_offset_amps diff --git a/msg/EgdCsvCmd.msg b/msg/EgdCsvCmd.msg new file mode 100644 index 0000000..b0977da --- /dev/null +++ b/msg/EgdCsvCmd.msg @@ -0,0 +1,4 @@ +string name +int32 target_velocity +int32 velocity_offset +float64 torque_offset_amps diff --git a/msg/EgdState.msg b/msg/EgdState.msg new file mode 100644 index 0000000..9c93e6e --- /dev/null +++ b/msg/EgdState.msg @@ -0,0 +1,36 @@ +int32 actual_position +int32 actual_velocity +float64 actual_current +bool faulted +int32 cmd_position +int32 cmd_velocity +float64 cmd_current +float64 cmd_max_current +int32 cmd_ff_position +int32 cmd_ff_velocity +float64 cmd_ff_current +uint8 actual_state_machine_state +uint8 actual_mode_of_operation +bool async_sdo_in_prog +uint8 sto_engaged +uint8 hall_state +uint8 in_motion +uint8 warning +uint8 target_reached +uint8 motor_on +uint8 fault_code +float64 bus_voltage +float64 analog_input_voltage +uint8 digital_input_ch1 +uint8 digital_input_ch2 +uint8 digital_input_ch3 +uint8 digital_input_ch4 +uint8 digital_input_ch5 +uint8 digital_input_ch6 +uint8 digital_output_cmd_ch1 +uint8 digital_output_cmd_ch2 +uint8 digital_output_cmd_ch3 +uint8 digital_output_cmd_ch4 +uint8 digital_output_cmd_ch5 +uint8 digital_output_cmd_ch6 +uint32 drive_temperature diff --git a/msg/EgdStates.msg b/msg/EgdStates.msg new file mode 100644 index 0000000..82000c6 --- /dev/null +++ b/msg/EgdStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/EgdState[] states diff --git a/msg/El2124State.msg b/msg/El2124State.msg new file mode 100644 index 0000000..bdc54ee --- /dev/null +++ b/msg/El2124State.msg @@ -0,0 +1,4 @@ +uint8 level_ch1 +uint8 level_ch2 +uint8 level_ch3 +uint8 level_ch4 diff --git a/msg/El2124States.msg b/msg/El2124States.msg new file mode 100644 index 0000000..5f76ea9 --- /dev/null +++ b/msg/El2124States.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/El2124State[] states diff --git a/msg/El2124WriteAllChannelsCmd.msg b/msg/El2124WriteAllChannelsCmd.msg new file mode 100644 index 0000000..bc95e0e --- /dev/null +++ b/msg/El2124WriteAllChannelsCmd.msg @@ -0,0 +1,5 @@ +string name +uint8 channel_ch1 +uint8 channel_ch2 +uint8 channel_ch3 +uint8 channel_ch4 diff --git a/msg/El2124WriteChannelCmd.msg b/msg/El2124WriteChannelCmd.msg new file mode 100644 index 0000000..6221519 --- /dev/null +++ b/msg/El2124WriteChannelCmd.msg @@ -0,0 +1,3 @@ +string name +uint8 channel +uint8 level diff --git a/msg/El3208State.msg b/msg/El3208State.msg new file mode 100644 index 0000000..7005bf5 --- /dev/null +++ b/msg/El3208State.msg @@ -0,0 +1,16 @@ +float64 output_ch1 +int16 adc_value_ch1 +float64 output_ch2 +int16 adc_value_ch2 +float64 output_ch3 +int16 adc_value_ch3 +float64 output_ch4 +int16 adc_value_ch4 +float64 output_ch5 +int16 adc_value_ch5 +float64 output_ch6 +int16 adc_value_ch6 +float64 output_ch7 +int16 adc_value_ch7 +float64 output_ch8 +int16 adc_value_ch8 diff --git a/msg/El3208States.msg b/msg/El3208States.msg new file mode 100644 index 0000000..a4d7725 --- /dev/null +++ b/msg/El3208States.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/El3208State[] states diff --git a/msg/El3602State.msg b/msg/El3602State.msg new file mode 100644 index 0000000..cf7c6cd --- /dev/null +++ b/msg/El3602State.msg @@ -0,0 +1,4 @@ +float64 voltage_ch1 +int32 adc_value_ch1 +float64 voltage_ch2 +int32 adc_value_ch2 diff --git a/msg/El3602States.msg b/msg/El3602States.msg new file mode 100644 index 0000000..ac0fa53 --- /dev/null +++ b/msg/El3602States.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/El3602State[] states diff --git a/msg/FaulterEnableCmd.msg b/msg/FaulterEnableCmd.msg new file mode 100644 index 0000000..01afb85 --- /dev/null +++ b/msg/FaulterEnableCmd.msg @@ -0,0 +1,2 @@ +string name +bool enable diff --git a/msg/FaulterState.msg b/msg/FaulterState.msg new file mode 100644 index 0000000..aac369e --- /dev/null +++ b/msg/FaulterState.msg @@ -0,0 +1,2 @@ +bool enable +bool fault_active diff --git a/msg/FaulterStates.msg b/msg/FaulterStates.msg new file mode 100644 index 0000000..b444dd7 --- /dev/null +++ b/msg/FaulterStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/FaulterState[] states diff --git a/msg/FilterState.msg b/msg/FilterState.msg new file mode 100644 index 0000000..4ce80c8 --- /dev/null +++ b/msg/FilterState.msg @@ -0,0 +1 @@ +float64 output diff --git a/msg/FilterStates.msg b/msg/FilterStates.msg new file mode 100644 index 0000000..2a1f113 --- /dev/null +++ b/msg/FilterStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/FilterState[] states diff --git a/msg/FtsTareCmd.msg b/msg/FtsTareCmd.msg new file mode 100644 index 0000000..42f2bc1 --- /dev/null +++ b/msg/FtsTareCmd.msg @@ -0,0 +1 @@ +string name diff --git a/msg/FunctionState.msg b/msg/FunctionState.msg new file mode 100644 index 0000000..4ce80c8 --- /dev/null +++ b/msg/FunctionState.msg @@ -0,0 +1 @@ +float64 output diff --git a/msg/FunctionStates.msg b/msg/FunctionStates.msg new file mode 100644 index 0000000..11eb1dd --- /dev/null +++ b/msg/FunctionStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/FunctionState[] states diff --git a/msg/JedSetCmdValueCmd.msg b/msg/JedSetCmdValueCmd.msg new file mode 100644 index 0000000..74af822 --- /dev/null +++ b/msg/JedSetCmdValueCmd.msg @@ -0,0 +1,2 @@ +string name +uint16 cmd diff --git a/msg/JedState.msg b/msg/JedState.msg new file mode 100644 index 0000000..1d6c173 --- /dev/null +++ b/msg/JedState.msg @@ -0,0 +1,10 @@ +uint16 status +uint16 cmd +uint32 w_raw +uint32 x_raw +uint32 y_raw +uint32 z_raw +float64 w +float64 x +float64 y +float64 z diff --git a/msg/JedStates.msg b/msg/JedStates.msg new file mode 100644 index 0000000..b7ee2d0 --- /dev/null +++ b/msg/JedStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/JedState[] states diff --git a/msg/ModuleState.msg b/msg/ModuleState.msg new file mode 100644 index 0000000..62e9269 --- /dev/null +++ b/msg/ModuleState.msg @@ -0,0 +1,2 @@ +float64 jitter +bool faulted diff --git a/msg/PidActivateCmd.msg b/msg/PidActivateCmd.msg new file mode 100644 index 0000000..b466e88 --- /dev/null +++ b/msg/PidActivateCmd.msg @@ -0,0 +1,5 @@ +string name +float64 setpoint +float64 deadband +float64 persistence_duration +float64 max_duration diff --git a/msg/PidState.msg b/msg/PidState.msg new file mode 100644 index 0000000..8cfb5b9 --- /dev/null +++ b/msg/PidState.msg @@ -0,0 +1,5 @@ +bool active +float64 output +float64 kp_term +float64 ki_term +float64 kd_term diff --git a/msg/PidStates.msg b/msg/PidStates.msg new file mode 100644 index 0000000..8eec2f5 --- /dev/null +++ b/msg/PidStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/PidState[] states diff --git a/msg/SaturationState.msg b/msg/SaturationState.msg new file mode 100644 index 0000000..4ce80c8 --- /dev/null +++ b/msg/SaturationState.msg @@ -0,0 +1 @@ +float64 output diff --git a/msg/SaturationStates.msg b/msg/SaturationStates.msg new file mode 100644 index 0000000..80ed12e --- /dev/null +++ b/msg/SaturationStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/SaturationState[] states diff --git a/msg/SchmittTriggerState.msg b/msg/SchmittTriggerState.msg new file mode 100644 index 0000000..8f8d145 --- /dev/null +++ b/msg/SchmittTriggerState.msg @@ -0,0 +1 @@ +bool output diff --git a/msg/SchmittTriggerStates.msg b/msg/SchmittTriggerStates.msg new file mode 100644 index 0000000..639841f --- /dev/null +++ b/msg/SchmittTriggerStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/SchmittTriggerState[] states diff --git a/msg/SignalGeneratorState.msg b/msg/SignalGeneratorState.msg new file mode 100644 index 0000000..4ce80c8 --- /dev/null +++ b/msg/SignalGeneratorState.msg @@ -0,0 +1 @@ +float64 output diff --git a/msg/SignalGeneratorStates.msg b/msg/SignalGeneratorStates.msg new file mode 100644 index 0000000..6613f3a --- /dev/null +++ b/msg/SignalGeneratorStates.msg @@ -0,0 +1,2 @@ +string[] names +fcat_msgs/SignalGeneratorState[] states diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..c159be4 --- /dev/null +++ b/package.xml @@ -0,0 +1,23 @@ + + + + fcat_msgs + 0.5.0 + Message Definitions for FCAT Node + Alex Brinkman + CALTECH_2021 (see License.md) + + ament_cmake + rosidl_default_generators + + builtin_interfaces + + builtin_interfaces + rosidl_default_runtime + + rosidl_interface_packages + + + ament_cmake + + diff --git a/srv/ActuatorCalibrateCmd.srv b/srv/ActuatorCalibrateCmd.srv new file mode 100644 index 0000000..28d248f --- /dev/null +++ b/srv/ActuatorCalibrateCmd.srv @@ -0,0 +1,8 @@ +string name +float64 velocity +float64 accel +float64 max_current + +--- +bool success +string message diff --git a/srv/ActuatorProfPosCmd.srv b/srv/ActuatorProfPosCmd.srv new file mode 100644 index 0000000..5ec0438 --- /dev/null +++ b/srv/ActuatorProfPosCmd.srv @@ -0,0 +1,8 @@ +string name +float64 target_position +float64 profile_velocity +float64 profile_accel +uint8 relative +--- +bool success +string message diff --git a/srv/ActuatorProfTorqueCmd.srv b/srv/ActuatorProfTorqueCmd.srv new file mode 100644 index 0000000..0eb92a1 --- /dev/null +++ b/srv/ActuatorProfTorqueCmd.srv @@ -0,0 +1,6 @@ +string name +float64 target_torque_amps +float64 max_duration +--- +bool success +string message diff --git a/srv/ActuatorProfVelCmd.srv b/srv/ActuatorProfVelCmd.srv new file mode 100644 index 0000000..5662a68 --- /dev/null +++ b/srv/ActuatorProfVelCmd.srv @@ -0,0 +1,7 @@ +string name +float64 target_velocity +float64 profile_accel +float64 max_duration +--- +bool success +string message diff --git a/srv/PidActivateCmd.srv b/srv/PidActivateCmd.srv new file mode 100644 index 0000000..c79c7dd --- /dev/null +++ b/srv/PidActivateCmd.srv @@ -0,0 +1,8 @@ +string name +float64 setpoint +float64 deadband +float64 persistence_duration +float64 max_duration +--- +bool success +string message