├── CHANGELOG.rst ├── CMakeLists.txt ├── LICENSE ├── README.md ├── config ├── TMCM-0930_Ext.yaml ├── TMCM-1140_Ext.yaml ├── TMCM-1160_Ext.yaml ├── TMCM-1180_Ext.yaml ├── TMCM-1230_Ext.yaml ├── TMCM-1231_Ext.yaml ├── TMCM-1240_Ext.yaml ├── TMCM-1241_Ext.yaml ├── TMCM-1260_Ext.yaml ├── TMCM-1270_Ext.yaml ├── TMCM-1276_Ext.yaml ├── TMCM-1278_Ext.yaml ├── TMCM-1311_Ext.yaml ├── TMCM-1316_Ext.yaml ├── TMCM-1378_Ext.yaml ├── TMCM-1617_Ext.yaml ├── TMCM-1633_Ext.yaml ├── TMCM-1636_Ext.yaml ├── TMCM-1637_Ext.yaml ├── TMCM-1638_Ext.yaml ├── TMCM-1670_Ext.yaml ├── TMCM-2611_Ext.yaml ├── TMCM-3110_Ext.yaml ├── TMCM-3212_Ext.yaml ├── TMCM-3230_Ext.yaml ├── TMCM-3351_Ext.yaml ├── TMCM-343_Ext.yaml ├── TMCM-351_Ext.yaml ├── TMCM-6110_Ext.yaml ├── TMCM-6212_Ext.yaml ├── TMCM-6214_Ext.yaml └── autogenerated │ ├── TMCM-0930.yaml │ ├── TMCM-1140.yaml │ ├── TMCM-1160.yaml │ ├── TMCM-1180.yaml │ ├── TMCM-1230.yaml │ ├── TMCM-1231.yaml │ ├── TMCM-1240.yaml │ ├── TMCM-1241.yaml │ ├── TMCM-1260.yaml │ ├── TMCM-1270.yaml │ ├── TMCM-1276.yaml │ ├── TMCM-1278.yaml │ ├── TMCM-1311.yaml │ ├── TMCM-1316.yaml │ ├── TMCM-1378.yaml │ ├── TMCM-1617.yaml │ ├── TMCM-1633.yaml │ ├── TMCM-1636.yaml │ ├── TMCM-1637.yaml │ ├── TMCM-1638.yaml │ ├── TMCM-1670.yaml │ ├── TMCM-2611.yaml │ ├── TMCM-3110.yaml │ ├── TMCM-3212.yaml │ ├── TMCM-3230.yaml │ ├── TMCM-3351.yaml │ ├── TMCM-343.yaml │ ├── TMCM-351.yaml │ ├── TMCM-6110.yaml │ ├── TMCM-6212.yaml │ └── TMCM-6214.yaml ├── docs └── images │ ├── tmcl_ros2_Software_Architecture_Diagram.png │ ├── tmcm_1636_actual_setup.png │ └── tmcm_1636_setup.png ├── include └── adi_tmcl │ ├── socket_can_wrapper.hpp │ ├── tmcl_bldc_motor.hpp │ ├── tmcl_common.hpp │ ├── tmcl_interpreter.hpp │ ├── tmcl_motor.hpp │ ├── tmcl_ros2.hpp │ └── tmcl_stepper_motor.hpp ├── launch ├── tmcm_0930.launch.py ├── tmcm_1140.launch.py ├── tmcm_1160.launch.py ├── tmcm_1180.launch.py ├── tmcm_1230.launch.py ├── tmcm_1231.launch.py ├── tmcm_1240.launch.py ├── tmcm_1241.launch.py ├── tmcm_1260.launch.py ├── tmcm_1270.launch.py ├── tmcm_1276.launch.py ├── tmcm_1278.launch.py ├── tmcm_1311.launch.py ├── tmcm_1316.launch.py ├── tmcm_1378.launch.py ├── tmcm_1617.launch.py ├── tmcm_1633.launch.py ├── tmcm_1636.launch.py ├── tmcm_1637.launch.py ├── tmcm_1638.launch.py ├── tmcm_1670.launch.py ├── tmcm_2611.launch.py ├── tmcm_3110.launch.py ├── tmcm_3212.launch.py ├── tmcm_3230.launch.py ├── tmcm_3351.launch.py ├── tmcm_343.launch.py ├── tmcm_351.launch.py ├── tmcm_6110.launch.py ├── tmcm_6212.launch.py └── tmcm_6214.launch.py ├── msg ├── TmcInfo.msg └── TmcParam.msg ├── package.xml ├── scripts ├── CAN_deinit.sh ├── CAN_init.sh ├── fake_cmd_pos.sh ├── fake_cmd_trq.sh └── fake_cmd_vel.sh ├── src ├── socket_can_wrapper.cpp ├── tmcl_bldc_motor.cpp ├── tmcl_interpreter.cpp ├── tmcl_motor.cpp ├── tmcl_ros2.cpp ├── tmcl_ros2_node.cpp └── tmcl_stepper_motor.cpp └── srv ├── TmcCustomCmd.srv ├── TmcGapAll.srv └── TmcGgpAll.srv /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 | Changelog for package tmcl_ros2 3 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 | 5 | 2.0.3 (2024-11-13) 6 | ------------------ 7 | * Fix handling of incorrect parameter type and update header files to .hpp 8 | * Contributors: Jamila Macagba 9 | 10 | 2.0.2 (2024-11-05) 11 | ------------------ 12 | * Added support for TMCM-1316 13 | * Contributors: Jamila Macagba 14 | 15 | 2.0.1 (2024-07-15) 16 | ------------------ 17 | * Added support for TMCM-2611 18 | Added support for TMCM-2611 19 | Co-Authored-By: Christian Joseph Acar <124771470+CAcarADI@users.noreply.github.com> 20 | Co-Authored-By: Jamila Macagba <124771486+jmacagba@users.noreply.github.com> 21 | * Update README.md 22 | Update README.md with mention of adi_tmcl and tmcl_ros2 23 | Co-Authored-By: Jamila Macagba <124771486+jmacagba@users.noreply.github.com> 24 | * Contributors: mmaralit-adi 25 | 26 | 2.0.0 (2023-11-21) 27 | ------------------ 28 | * Updated package name and TF values 29 | * Updated to: 30 | 31 | - Change package name from "tmcl_ros2" to "adi_tmcl" in preparation for ROS release 32 | - Change TF values (default) 33 | 34 | * Contributors: mmaralit-adi, jmacagba 35 | 36 | 1.0.2 (2023-10-27) 37 | ------------------ 38 | * Update LICENSE file 39 | * Contributors: Jamila Macagba 40 | 41 | 1.0.1 (2023-10-10) 42 | ------------------ 43 | * Removed obsolete modules and updated analog.com references in README 44 | * Updated to: 45 | 46 | - Remove obsolete modules 47 | - Update analog.com pages in README.md 48 | - Update CMakeLists.txt to make sure other drivers that has same names as socket_can_wrapper will not cause conflicts 49 | 50 | * Contributors: mmaralit-adi, jmacagba 51 | 52 | 1.0.0 (2023-09-27) 53 | ------------------ 54 | * Adding v1.0.0 of tmcl_ros2, ROS2, Humble 55 | 56 | - Contains official ROS2 Driver for Trinamic Motor Controllers (TMC) that uses Trinamic Motion Control Language (TMCL) protocol 57 | - Supported TMC boards: TMCM-1636, TMCM-1617, TMCM-1241, TMCM-1260, TMCM-6214 58 | - Supported communication interface and interface driver: CAN (SocketCAN) 59 | - Supported ROS and OS distro: Humble (Ubuntu 22.04) 60 | - Supported platform: Intel x86 64-bit (amd64) 61 | 62 | * Contributors: mmaralit-adi, jmacagba 63 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 Analog Devices, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of Analog Devices, Inc. nor the names of its contributors may 15 | be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 25 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 28 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /config/TMCM-0930_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-0930 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | -------------------------------------------------------------------------------- /config/TMCM-1140_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1140 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1160_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1160 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1180_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1180 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1230_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1230 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1231_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1231 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1240_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1240 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1241_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1241 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1260_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1260 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1270_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1270 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1276_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1276 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1278_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1278 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1311_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1311 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1316_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1316 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1378_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1378 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1617_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1617 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1633_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1633 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1636_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1636 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1637_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1637 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1638_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1638 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-1670_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-1670 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | -------------------------------------------------------------------------------- /config/TMCM-2611_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-2611 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | -------------------------------------------------------------------------------- /config/TMCM-3110_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-3110 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | motor2: 107 | en_pub_tmc_info: true 108 | pub_rate_tmc_info: 10 109 | pub_actual_vel: true 110 | pub_actual_pos: true 111 | pub_actual_trq: true 112 | tmc_info_topic: "/tmc_info_2" 113 | tmc_cmd_vel_topic: "/cmd_vel_2" 114 | tmc_cmd_abspos_topic: "/cmd_abspos_2" 115 | tmc_cmd_relpos_topic: "/cmd_relpos_2" 116 | tmc_cmd_trq_topic: "/cmd_trq_2" 117 | 118 | wheel_diameter: 0.25 119 | additional_ratio_vel: 1.0 120 | additional_ratio_pos: 1.0 121 | additional_ratio_trq: 1.0 122 | 123 | -------------------------------------------------------------------------------- /config/TMCM-3212_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-3212 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | motor2: 107 | en_pub_tmc_info: true 108 | pub_rate_tmc_info: 10 109 | pub_actual_vel: true 110 | pub_actual_pos: true 111 | pub_actual_trq: true 112 | tmc_info_topic: "/tmc_info_2" 113 | tmc_cmd_vel_topic: "/cmd_vel_2" 114 | tmc_cmd_abspos_topic: "/cmd_abspos_2" 115 | tmc_cmd_relpos_topic: "/cmd_relpos_2" 116 | tmc_cmd_trq_topic: "/cmd_trq_2" 117 | 118 | wheel_diameter: 0.25 119 | additional_ratio_vel: 1.0 120 | additional_ratio_pos: 1.0 121 | additional_ratio_trq: 1.0 122 | 123 | -------------------------------------------------------------------------------- /config/TMCM-3230_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-3230 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | motor2: 107 | en_pub_tmc_info: true 108 | pub_rate_tmc_info: 10 109 | pub_actual_vel: true 110 | pub_actual_pos: true 111 | pub_actual_trq: true 112 | tmc_info_topic: "/tmc_info_2" 113 | tmc_cmd_vel_topic: "/cmd_vel_2" 114 | tmc_cmd_abspos_topic: "/cmd_abspos_2" 115 | tmc_cmd_relpos_topic: "/cmd_relpos_2" 116 | tmc_cmd_trq_topic: "/cmd_trq_2" 117 | 118 | wheel_diameter: 0.25 119 | additional_ratio_vel: 1.0 120 | additional_ratio_pos: 1.0 121 | additional_ratio_trq: 1.0 122 | 123 | -------------------------------------------------------------------------------- /config/TMCM-3351_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-3351 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | motor2: 107 | en_pub_tmc_info: true 108 | pub_rate_tmc_info: 10 109 | pub_actual_vel: true 110 | pub_actual_pos: true 111 | pub_actual_trq: true 112 | tmc_info_topic: "/tmc_info_2" 113 | tmc_cmd_vel_topic: "/cmd_vel_2" 114 | tmc_cmd_abspos_topic: "/cmd_abspos_2" 115 | tmc_cmd_relpos_topic: "/cmd_relpos_2" 116 | tmc_cmd_trq_topic: "/cmd_trq_2" 117 | 118 | wheel_diameter: 0.25 119 | additional_ratio_vel: 1.0 120 | additional_ratio_pos: 1.0 121 | additional_ratio_trq: 1.0 122 | 123 | -------------------------------------------------------------------------------- /config/TMCM-343_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-343 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | motor2: 107 | en_pub_tmc_info: true 108 | pub_rate_tmc_info: 10 109 | pub_actual_vel: true 110 | pub_actual_pos: true 111 | pub_actual_trq: true 112 | tmc_info_topic: "/tmc_info_2" 113 | tmc_cmd_vel_topic: "/cmd_vel_2" 114 | tmc_cmd_abspos_topic: "/cmd_abspos_2" 115 | tmc_cmd_relpos_topic: "/cmd_relpos_2" 116 | tmc_cmd_trq_topic: "/cmd_trq_2" 117 | 118 | wheel_diameter: 0.25 119 | additional_ratio_vel: 1.0 120 | additional_ratio_pos: 1.0 121 | additional_ratio_trq: 1.0 122 | 123 | -------------------------------------------------------------------------------- /config/TMCM-351_Ext.yaml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # Parameter Configurations for TMCM-351 3 | ########################################################## 4 | 5 | /**: 6 | ros__parameters: 7 | ########## Interface Settings 8 | 9 | # Communication interface 10 | # Description: Interface used between the PC and the TMC 11 | # Possible values: 12 | # - 0: CAN 13 | comm_interface: 0 14 | 15 | # Communication interface name 16 | # Description: Name of the interface or device as detected by the PC 17 | # Possible values: 18 | # - can0, can1, can2, ..., etc 19 | comm_interface_name: can0 20 | 21 | # Communication interface Tx ID 22 | # Description: Currently applicable only for CAN interface (Tx ID) 23 | # Possible values: 24 | # - 0 to 255 25 | # Note: The ID that would work will be the one set at the TMC's GP: 71 26 | comm_tx_id: 1 27 | 28 | # Communication interface Rx ID 29 | # Description: Currently applicable only for CAN interface (Rx ID) 30 | # Possible values: 31 | # - 0 to 255 32 | # Note: The ID that would work will be the one set at the TMC's GP: 70 33 | comm_rx_id: 2 34 | 35 | # Communication timeout rate in seconds 36 | # Description: Indicates how long should the node will wait for the rx data 37 | # Possible values: 38 | # - value in millisecs 0 - 5000 39 | comm_timeout_ms: 100 40 | 41 | # Communication timeout tries 42 | # Description: Indicates how many the node will retry sending data before shutting down if no data received 43 | # Possible values: 44 | # - 1 - 3 45 | comm_exec_cmd_retries: 1 46 | 47 | ########## Additional Settings 48 | 49 | # Adhoc Mode 50 | # Description: This mode expects that the used module is not known. The velocity, position and torque relies on the additional ratios 51 | adhoc_mode: false 52 | 53 | # Active motors or axes 54 | # Description: Enables/disables active motors or axes. If disabled, settings for those motors will be ignored or not set. 55 | # Possible values: 56 | # - 0: Not used 57 | # - 1: Active 58 | en_motors: [1,1,1] 59 | 60 | # Auto start mode additional delay 61 | # Decription: Added delay if auto start mode is enabled. You can add delay if your TMCL program needs to run over 2 seconds. 62 | # Possible values: 0 - 10 (secs) 63 | auto_start_additional_delay: 0 64 | 65 | ########################################################## 66 | ########################################################## 67 | # Configurations below are divided on each motor/axis. If the module used have more motors than listed below, 68 | # copy and paste all the configuration per motor, configure the needed topic names, wheel diameter values and 69 | # generic ratios, and rename the motor name (should follow motor naming below - motor0, motor1, ..., motorn) 70 | # otherwise, the node will fail. 71 | 72 | motor0: 73 | en_pub_tmc_info: true 74 | pub_rate_tmc_info: 10 75 | pub_actual_vel: true 76 | pub_actual_pos: true 77 | pub_actual_trq: true 78 | tmc_info_topic: "/tmc_info_0" 79 | tmc_cmd_vel_topic: "/cmd_vel_0" 80 | tmc_cmd_abspos_topic: "/cmd_abspos_0" 81 | tmc_cmd_relpos_topic: "/cmd_relpos_0" 82 | tmc_cmd_trq_topic: "/cmd_trq_0" 83 | 84 | wheel_diameter: 0.25 85 | additional_ratio_vel: 1.0 86 | additional_ratio_pos: 1.0 87 | additional_ratio_trq: 1.0 88 | 89 | motor1: 90 | en_pub_tmc_info: true 91 | pub_rate_tmc_info: 10 92 | pub_actual_vel: true 93 | pub_actual_pos: true 94 | pub_actual_trq: true 95 | tmc_info_topic: "/tmc_info_1" 96 | tmc_cmd_vel_topic: "/cmd_vel_1" 97 | tmc_cmd_abspos_topic: "/cmd_abspos_1" 98 | tmc_cmd_relpos_topic: "/cmd_relpos_1" 99 | tmc_cmd_trq_topic: "/cmd_trq_1" 100 | 101 | wheel_diameter: 0.25 102 | additional_ratio_vel: 1.0 103 | additional_ratio_pos: 1.0 104 | additional_ratio_trq: 1.0 105 | 106 | motor2: 107 | en_pub_tmc_info: true 108 | pub_rate_tmc_info: 10 109 | pub_actual_vel: true 110 | pub_actual_pos: true 111 | pub_actual_trq: true 112 | tmc_info_topic: "/tmc_info_2" 113 | tmc_cmd_vel_topic: "/cmd_vel_2" 114 | tmc_cmd_abspos_topic: "/cmd_abspos_2" 115 | tmc_cmd_relpos_topic: "/cmd_relpos_2" 116 | tmc_cmd_trq_topic: "/cmd_trq_2" 117 | 118 | wheel_diameter: 0.25 119 | additional_ratio_vel: 1.0 120 | additional_ratio_pos: 1.0 121 | additional_ratio_trq: 1.0 122 | 123 | -------------------------------------------------------------------------------- /config/autogenerated/TMCM-0930.yaml: -------------------------------------------------------------------------------- 1 | #================================================================================= 2 | # Auto-generated YAML configurations for TMCM-0930 3 | #================================================================================= 4 | 5 | # Note that it is assumed that the AP configurations don't differ between all motors/axes. 6 | # This means only configurations for Axis0 are placed into this YAML. 7 | /**: 8 | ros__parameters: 9 | # Available Axis Parameters 10 | AP_name: [] 11 | 12 | AP_type: [] 13 | 14 | # Available Global Parameters 15 | GP_name: [serial baud rate, 16 | serial address, 17 | serial heartbeat, 18 | CAN bitrate, 19 | CAN send id, 20 | CAN receive id, 21 | telegram pause time, 22 | serial host address, 23 | auto start mode, 24 | i/o mask, 25 | protection mode, 26 | CAN heartbeat, 27 | CAN secondary address, 28 | store coordinates in EEPROM, 29 | do not restore user variables, 30 | serial secondary address, 31 | application status, 32 | download mode, 33 | program counter, 34 | last tmcl error, 35 | tick timer, 36 | random number] 37 | 38 | GP_type: [65, 39 | 66, 40 | 68, 41 | 69, 42 | 70, 43 | 71, 44 | 75, 45 | 76, 46 | 77, 47 | 78, 48 | 81, 49 | 82, 50 | 83, 51 | 84, 52 | 85, 53 | 87, 54 | 128, 55 | 129, 56 | 130, 57 | 131, 58 | 132, 59 | 133] 60 | -------------------------------------------------------------------------------- /config/autogenerated/TMCM-343.yaml: -------------------------------------------------------------------------------- 1 | #================================================================================= 2 | # Auto-generated YAML configurations for TMCM-343 3 | #================================================================================= 4 | 5 | # Note that it is assumed that the AP configurations don't differ between all motors/axes. 6 | # This means only configurations for Axis0 are placed into this YAML. 7 | /**: 8 | ros__parameters: 9 | # Available Axis Parameters 10 | AP_name: [TargetPosition, 11 | ActualPosition, 12 | TargetVelocity, 13 | ActualVelocity, 14 | MaxVelocity, 15 | MaxAcceleration, 16 | MaxCurrent, 17 | StandbyCurrent, 18 | PositionReachedFlag, 19 | reference switch status, 20 | RightEndstop, 21 | LeftEndstop, 22 | right limit switch disable, 23 | left limit switch disable, 24 | minimum speed, 25 | actual acceleration, 26 | ramp mode, 27 | MicrostepResolution, 28 | ref. switch tolerance, 29 | soft stop flag, 30 | ramp divisor, 31 | PulseDivisor, 32 | ReferenceSearchMode, 33 | ReferenceSearchSpeed, 34 | reference switch speed, 35 | reference switch distance, 36 | last reference switch position, 37 | BoostCurrent, 38 | mixed decay threshold, 39 | freewheeling delay, 40 | stall threshold, 41 | LoadValue, 42 | extended error flags, 43 | driver error flags, 44 | EncoderPosition, 45 | encoder prescaler, 46 | fullstep threshold, 47 | max. position encoder deviation, 48 | group index, 49 | PowerDownDelay] 50 | 51 | AP_type: [0, 52 | 1, 53 | 2, 54 | 3, 55 | 4, 56 | 5, 57 | 6, 58 | 7, 59 | 8, 60 | 9, 61 | 10, 62 | 11, 63 | 12, 64 | 13, 65 | 130, 66 | 135, 67 | 138, 68 | 140, 69 | 141, 70 | 149, 71 | 153, 72 | 154, 73 | 193, 74 | 194, 75 | 195, 76 | 196, 77 | 197, 78 | 200, 79 | 203, 80 | 204, 81 | 205, 82 | 206, 83 | 207, 84 | 208, 85 | 209, 86 | 210, 87 | 211, 88 | 212, 89 | 213, 90 | 214] 91 | 92 | # Available Global Parameters 93 | GP_name: [serial baud rate, 94 | serial address, 95 | ASCII mode, 96 | serial heartbeat, 97 | CAN bitrate, 98 | CAN send id, 99 | CAN receive id, 100 | encoder configuration, 101 | telegram pause time, 102 | serial host address, 103 | auto start mode, 104 | shutdown pin function, 105 | protection mode, 106 | CAN heartbeat, 107 | CAN secondary address, 108 | store coordinates in EEPROM, 109 | do not restore user variables, 110 | serial secondary address, 111 | application status, 112 | download mode, 113 | program counter, 114 | last tmcl error, 115 | tick timer, 116 | random number] 117 | 118 | GP_type: [65, 119 | 66, 120 | 67, 121 | 68, 122 | 69, 123 | 70, 124 | 71, 125 | 74, 126 | 75, 127 | 76, 128 | 77, 129 | 80, 130 | 81, 131 | 82, 132 | 83, 133 | 84, 134 | 85, 135 | 87, 136 | 128, 137 | 129, 138 | 130, 139 | 131, 140 | 132, 141 | 133] 142 | -------------------------------------------------------------------------------- /config/autogenerated/TMCM-351.yaml: -------------------------------------------------------------------------------- 1 | #================================================================================= 2 | # Auto-generated YAML configurations for TMCM-351 3 | #================================================================================= 4 | 5 | # Note that it is assumed that the AP configurations don't differ between all motors/axes. 6 | # This means only configurations for Axis0 are placed into this YAML. 7 | /**: 8 | ros__parameters: 9 | # Available Axis Parameters 10 | AP_name: [TargetPosition, 11 | ActualPosition, 12 | TargetVelocity, 13 | ActualVelocity, 14 | MaxVelocity, 15 | MaxAcceleration, 16 | MaxCurrent, 17 | StandbyCurrent, 18 | PositionReachedFlag, 19 | reference switch status, 20 | RightEndstop, 21 | LeftEndstop, 22 | right limit switch disable, 23 | left limit switch disable, 24 | minimum speed, 25 | actual acceleration, 26 | ramp mode, 27 | MicrostepResolution, 28 | ref. switch tolerance, 29 | soft stop flag, 30 | ramp divisor, 31 | PulseDivisor, 32 | ReferenceSearchMode, 33 | ReferenceSearchSpeed, 34 | reference switch speed, 35 | reference switch distance, 36 | last reference switch position, 37 | BoostCurrent, 38 | mixed decay threshold, 39 | freewheeling delay, 40 | stall threshold, 41 | LoadValue, 42 | extended error flags, 43 | driver error flags, 44 | EncoderPosition, 45 | encoder prescaler, 46 | fullstep threshold, 47 | max. position encoder deviation, 48 | group index, 49 | PowerDownDelay] 50 | 51 | AP_type: [0, 52 | 1, 53 | 2, 54 | 3, 55 | 4, 56 | 5, 57 | 6, 58 | 7, 59 | 8, 60 | 9, 61 | 10, 62 | 11, 63 | 12, 64 | 13, 65 | 130, 66 | 135, 67 | 138, 68 | 140, 69 | 141, 70 | 149, 71 | 153, 72 | 154, 73 | 193, 74 | 194, 75 | 195, 76 | 196, 77 | 197, 78 | 200, 79 | 203, 80 | 204, 81 | 205, 82 | 206, 83 | 207, 84 | 208, 85 | 209, 86 | 210, 87 | 211, 88 | 212, 89 | 213, 90 | 214] 91 | 92 | # Available Global Parameters 93 | GP_name: [serial baud rate, 94 | serial address, 95 | ASCII mode, 96 | serial heartbeat, 97 | CAN bitrate, 98 | CAN send id, 99 | CAN receive id, 100 | telegram pause time, 101 | serial host address, 102 | auto start mode, 103 | shutdown pin function, 104 | protection mode, 105 | CAN heartbeat, 106 | CAN secondary address, 107 | store coordinates in EEPROM, 108 | do not restore user variables, 109 | serial secondary address, 110 | application status, 111 | download mode, 112 | program counter, 113 | last tmcl error, 114 | tick timer, 115 | random number] 116 | 117 | GP_type: [65, 118 | 66, 119 | 67, 120 | 68, 121 | 69, 122 | 70, 123 | 71, 124 | 75, 125 | 76, 126 | 77, 127 | 80, 128 | 81, 129 | 82, 130 | 83, 131 | 84, 132 | 85, 133 | 87, 134 | 128, 135 | 129, 136 | 130, 137 | 131, 138 | 132, 139 | 133] 140 | -------------------------------------------------------------------------------- /config/autogenerated/TMCM-6110.yaml: -------------------------------------------------------------------------------- 1 | #================================================================================= 2 | # Auto-generated YAML configurations for TMCM-6110 3 | #================================================================================= 4 | 5 | # Note that it is assumed that the AP configurations don't differ between all motors/axes. 6 | # This means only configurations for Axis0 are placed into this YAML. 7 | /**: 8 | ros__parameters: 9 | # Available Axis Parameters 10 | AP_name: [TargetPosition, 11 | ActualPosition, 12 | TargetVelocity, 13 | ActualVelocity, 14 | MaxVelocity, 15 | MaxAcceleration, 16 | MaxCurrent, 17 | StandbyCurrent, 18 | PositionReachedFlag, 19 | reference switch status, 20 | RightEndstop, 21 | LeftEndstop, 22 | right limit switch disable, 23 | left limit switch disable, 24 | minimum speed, 25 | actual acceleration, 26 | ramp mode, 27 | MicrostepResolution, 28 | ref. switch tolerance, 29 | soft stop flag, 30 | EndSwitchPowerDown, 31 | ramp divisor, 32 | PulseDivisor, 33 | Intpol, 34 | DoubleEdgeSteps, 35 | ChopperBlankTime, 36 | ConstantTOffMode, 37 | DisableFastDecayComparator, 38 | ChopperHysteresisEnd, 39 | ChopperHysteresisStart, 40 | TOff, 41 | SEIMIN, 42 | SECDS, 43 | smartEnergyHysteresis, 44 | SECUS, 45 | smartEnergyHysteresisStart, 46 | SG2FilterEnable, 47 | SG2Threshold, 48 | slope control high side, 49 | slope control low side, 50 | ShortToGroundProtection, 51 | ShortDetectionTime, 52 | VSense, 53 | smartEnergyActualCurrent, 54 | smartEnergyStallVelocity, 55 | smartEnergyThresholdSpeed, 56 | smartEnergySlowRunCurrent, 57 | RandomTOffMode, 58 | ReferenceSearchMode, 59 | ReferenceSearchSpeed, 60 | reference switch speed, 61 | reference switch distance, 62 | last reference switch position, 63 | BoostCurrent, 64 | freewheeling delay, 65 | LoadValue, 66 | extended error flags, 67 | DrvStatusFlags, 68 | group index, 69 | PowerDownDelay] 70 | 71 | AP_type: [0, 72 | 1, 73 | 2, 74 | 3, 75 | 4, 76 | 5, 77 | 6, 78 | 7, 79 | 8, 80 | 9, 81 | 10, 82 | 11, 83 | 12, 84 | 13, 85 | 130, 86 | 135, 87 | 138, 88 | 140, 89 | 141, 90 | 149, 91 | 150, 92 | 153, 93 | 154, 94 | 160, 95 | 161, 96 | 162, 97 | 163, 98 | 164, 99 | 165, 100 | 166, 101 | 167, 102 | 168, 103 | 169, 104 | 170, 105 | 171, 106 | 172, 107 | 173, 108 | 174, 109 | 175, 110 | 176, 111 | 177, 112 | 178, 113 | 179, 114 | 180, 115 | 181, 116 | 182, 117 | 183, 118 | 184, 119 | 193, 120 | 194, 121 | 195, 122 | 196, 123 | 197, 124 | 200, 125 | 204, 126 | 206, 127 | 207, 128 | 208, 129 | 213, 130 | 214] 131 | 132 | # Available Global Parameters 133 | GP_name: [serial baud rate, 134 | serial address, 135 | ASCII mode, 136 | serial heartbeat, 137 | CAN bitrate, 138 | CAN send id, 139 | CAN receive id, 140 | telegram pause time, 141 | serial host address, 142 | auto start mode, 143 | limit switch polarity, 144 | protection mode, 145 | CAN heartbeat, 146 | CAN secondary address, 147 | store coordinates in EEPROM, 148 | do not restore user variables, 149 | serial secondary address, 150 | reverse shaft direction, 151 | application status, 152 | download mode, 153 | program counter, 154 | last tmcl error, 155 | tick timer, 156 | random number] 157 | 158 | GP_type: [65, 159 | 66, 160 | 67, 161 | 68, 162 | 69, 163 | 70, 164 | 71, 165 | 75, 166 | 76, 167 | 77, 168 | 79, 169 | 81, 170 | 82, 171 | 83, 172 | 84, 173 | 85, 174 | 87, 175 | 90, 176 | 128, 177 | 129, 178 | 130, 179 | 131, 180 | 132, 181 | 133] 182 | -------------------------------------------------------------------------------- /docs/images/tmcl_ros2_Software_Architecture_Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/tmcl_ros2/fa246ab6317999ac36a221fbb8098f3e3ee85c5c/docs/images/tmcl_ros2_Software_Architecture_Diagram.png -------------------------------------------------------------------------------- /docs/images/tmcm_1636_actual_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/tmcl_ros2/fa246ab6317999ac36a221fbb8098f3e3ee85c5c/docs/images/tmcm_1636_actual_setup.png -------------------------------------------------------------------------------- /docs/images/tmcm_1636_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/tmcl_ros2/fa246ab6317999ac36a221fbb8098f3e3ee85c5c/docs/images/tmcm_1636_setup.png -------------------------------------------------------------------------------- /include/adi_tmcl/socket_can_wrapper.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef SOCKET_CAN_WRAPPER_HPP 7 | #define SOCKET_CAN_WRAPPER_HPP 8 | 9 | class SocketCAN 10 | { 11 | public: 12 | /* Constructor */ 13 | SocketCAN(const char *logger_prefix); 14 | 15 | /* Destructor */ 16 | ~SocketCAN(); 17 | 18 | /* Initialize CAN with specified interface name */ 19 | bool initialize(const char *interface_name); 20 | 21 | /* De-initialize CAN */ 22 | void deinitialize(); 23 | 24 | /* Check if CAN frames are available */ 25 | bool framesAvailable(); 26 | 27 | /* Rx CAN frames */ 28 | bool readFrame(uint32_t *id, uint8_t *data, uint8_t *size); 29 | 30 | /* Tx CAN frames */ 31 | bool writeFrame(uint32_t id, uint8_t *data, uint8_t size); 32 | 33 | private: 34 | int can_socket_; 35 | std::string interface_name_; 36 | std::string logger_prefix_; 37 | rclcpp::Logger logger_; 38 | }; 39 | 40 | #endif // SOCKET_CAN_WRAPPER_HPP 41 | -------------------------------------------------------------------------------- /include/adi_tmcl/tmcl_bldc_motor.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef TMCL_BLDC_MOTOR_HPP 7 | #define TMCL_BLDC_MOTOR_HPP 8 | 9 | #include "adi_tmcl/tmcl_motor.hpp" 10 | 11 | /*******************************************************************************/ 12 | /* Constants and Enumerations */ 13 | /*******************************************************************************/ 14 | 15 | /* Possible values for */ 16 | typedef enum 17 | { 18 | BLDC_MODE_DISABLED = 0, 19 | BLDC_MODE_OPENLOOP, 20 | BLDC_MODE_CLOSEDLOOP 21 | } tmcl_bldc_comm_mode_t; 22 | 23 | 24 | class BldcMotor : public Motor 25 | { 26 | public: 27 | BldcMotor(rclcpp::Node::SharedPtr p_node, TmclInterpreter* p_tmcl_interpreter, 28 | uint8_t motor_number, uint32_t module_number); 29 | virtual ~BldcMotor(); 30 | 31 | void init() override; 32 | 33 | private: 34 | tmcl_bldc_comm_mode_t comm_mode_; 35 | int32_t position_scaler_m_; 36 | int32_t encoder_steps_; 37 | std::vector param_statusflags_regname_; 38 | std::vector param_statusflags_regshift_; 39 | 40 | void initPublisher() override; 41 | void pubTimerCallback() override; 42 | void initSubscriberParams() override; 43 | void initSubscribers() override; 44 | void cmdVelSubscriberCallback(const geometry_msgs::msg::Twist::SharedPtr msg) override; 45 | void cmdAbsposSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg) override; 46 | void cmdRelposSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg) override; 47 | tmcl_bldc_comm_mode_t getCommutationMode(); 48 | }; 49 | 50 | #endif //TMCL_BLDC_MOTOR_HPP 51 | -------------------------------------------------------------------------------- /include/adi_tmcl/tmcl_common.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef TMCL_COMMON_HPP 7 | #define TMCL_COMMON_HPP 8 | 9 | /*******************************************************************************/ 10 | /* Constants and Enumerations */ 11 | /*******************************************************************************/ 12 | 13 | 14 | /* LUT row indeces of get-able/set-able Communication Interface Parameters */ 15 | typedef enum 16 | { 17 | IDX_COMM_INTERFACE = 0, 18 | IDX_COMM_INTERFACE_NAME, 19 | IDX_COMM_TX_ID, 20 | IDX_COMM_RX_ID, 21 | IDX_COMM_TIMEOUT_MS, 22 | IDX_COMM_EXEC_CMD_RETRIES, 23 | TMCL_INTERFACE_PARAMS_LUT_MAX /* This should not be used */ 24 | }tmcl_interface_params_lut_t; 25 | 26 | /* Parameter Names of get-able/set-able Communication Interface Parameters */ 27 | static const std::vector comm_interface_params_ = { 28 | "comm_interface", 29 | "comm_interface_name", 30 | "comm_tx_id", 31 | "comm_rx_id", 32 | "comm_timeout_ms", 33 | "comm_exec_cmd_retries", 34 | "MAX" /* This should not be used */ 35 | }; 36 | 37 | #endif //TMCL_COMMON_HPP 38 | -------------------------------------------------------------------------------- /include/adi_tmcl/tmcl_interpreter.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef TMCL_INTERPRETER_HPP 7 | #define TMCL_INTERPRETER_HPP 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "adi_tmcl/socket_can_wrapper.hpp" 14 | 15 | /** A TMCL Tx/Rx format will always be lke the following: 16 | * - Tx: | [[Module Address]] | | | | | | | | [[Checksum]] 17 | * - Rx: | [[Reply Address]] | | | | | | | | [[Checksum]] 18 | * 19 | * Specifically, for CAN interface: 20 | * - Both Tx and Rx length will just be 7 bytes. 21 | * Those enclosed with [[]] are not part of the message (they will automatically be added on the hardware-level). 22 | * - Module Address: CAN-ID of the Sender 23 | * - Reply Address: CAN-ID of the Receiver 24 | * - Command, Type, Motor, Status can be either of the values enumerated below 25 | **/ 26 | const uint8_t TMCL_MSG_SZ = 7; 27 | const uint8_t TMCL_MSG_VALUE_SZ = 4; 28 | 29 | /*******************************************************************************/ 30 | /* Interface related settings */ 31 | /*******************************************************************************/ 32 | 33 | /* Supported interfaces */ 34 | typedef enum 35 | { 36 | TMCL_INTERFACE_CAN = 0, /* 0 - CAN Interface */ 37 | TMCL_INTERFACE_MAX, /* This should not be used */ 38 | } tmcl_interface_t; 39 | 40 | /* Supported interface's configurations */ 41 | /* Note: So far, these are all needed for CAN. Once other interfaces are added, 42 | convert this tmcl_cfg_t to a union then include different tmcl_cfg__t as members. */ 43 | typedef struct 44 | { 45 | SocketCAN *p_socket_can; 46 | std::string interface_name; 47 | uint16_t tx_id; 48 | uint16_t rx_id; 49 | } tmcl_cfg_t; 50 | 51 | /*******************************************************************************/ 52 | /* TMCL protocol related settings */ 53 | /*******************************************************************************/ 54 | /* Possible values for */ 55 | typedef enum 56 | { 57 | TMCL_CMD_ROR = 1, /* 1 - Rotate Right */ 58 | TMCL_CMD_ROL, /* 1 - Rotate Left */ 59 | TMCL_CMD_MST, /* 3 - Stop motor movement */ 60 | TMCL_CMD_MVP, /* 4 - Move to position */ 61 | TMCL_CMD_SAP, /* 5 - Set axis parameter */ 62 | TMCL_CMD_GAP, /* 6 - Get axis parameter */ 63 | TMCL_CMD_SGP = 9, /* 9 - Set global parameter */ 64 | TMCL_CMD_GGP, /* 10 - Get global parameter */ 65 | TMCL_CMD_APPGFWV = 136, /* 136 - Get firmware version */ 66 | TMCL_CMD_MAX /* This should not be used */ 67 | } tmcl_cmd_t; 68 | 69 | /* Possible values for */ 70 | typedef enum 71 | { 72 | TMCL_STS_ERR_CHKSUM = 1, 73 | TMCL_STS_ERR_CMD, 74 | TMCL_STS_ERR_TYPE, 75 | TMCL_STS_ERR_VAL, 76 | TMCL_STS_ERR_EEPROM_LCK, 77 | TMCL_STS_ERR_CMD_NA, 78 | TMCL_STS_ERR_NONE = 100, 79 | TMCL_STS_CMD_LOADED, 80 | TMCL_STS_MAX /* This should not be used */ 81 | } tmcl_sts_t; 82 | 83 | /* Definition for info needed to execute 1 TMCL command */ 84 | typedef struct 85 | { 86 | uint16_t tx_id; /* Module Address */ 87 | uint16_t rx_id; /* */ 89 | uint8_t type; /* */ 90 | uint8_t motor; /* */ 91 | uint8_t value[TMCL_MSG_VALUE_SZ]; /* 4-byte value */ 92 | tmcl_sts_t sts; 93 | } tmcl_msg_t; 94 | 95 | 96 | /* Class definition for TMCL Interpreter */ 97 | class TmclInterpreter 98 | { 99 | public: 100 | /* Constructor */ 101 | TmclInterpreter(tmcl_interface_t tmcl_interface, tmcl_cfg_t tmcl_cfg, uint16_t timeout_ms, 102 | uint8_t comm_exec_cmd_retries, const char *logger_prefix_); 103 | 104 | /* Destructor */ 105 | ~TmclInterpreter(); 106 | 107 | /* Reset interface */ 108 | bool resetInterface(); 109 | 110 | /* Execute command (Direct mode) */ 111 | bool executeCmd(tmcl_cmd_t cmd, uint8_t type, uint8_t motor, int32_t *val); 112 | bool executeCmd(tmcl_cmd_t cmd, const char* type, uint8_t motor, int32_t *val); 113 | 114 | /* Shutdown interface */ 115 | bool shutdownInterface(); 116 | 117 | void setAp(std::vector ap_name, std::vector ap_type); 118 | void setGp(std::vector gp_name, std::vector gp_type); 119 | 120 | bool getRetriesExceededStatus(); 121 | 122 | private: 123 | tmcl_interface_t tmcl_interface_; 124 | tmcl_cfg_t tmcl_cfg_; 125 | bool interface_enabled_; 126 | uint16_t timeout_ms_; 127 | uint8_t comm_exec_cmd_retries_; 128 | std::vector ap_name_; 129 | std::vector ap_type_; 130 | std::vector gp_name_; 131 | std::vector gp_type_; 132 | std::string logger_prefix_; 133 | rclcpp::Logger logger_; 134 | bool b_retries_exceeded_; 135 | }; 136 | 137 | #endif /* _TMCL_INTERPRETER_HPP */ 138 | -------------------------------------------------------------------------------- /include/adi_tmcl/tmcl_motor.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef TMCL_MOTOR_HPP 7 | #define TMCL_MOTOR_HPP 8 | 9 | #include "adi_tmcl/tmcl_interpreter.hpp" 10 | #include "adi_tmcl/tmcl_common.hpp" 11 | #include "std_msgs/msg/int32.hpp" 12 | #include "geometry_msgs/msg/twist.hpp" 13 | #include "adi_tmcl/msg/tmc_info.hpp" 14 | 15 | class Motor 16 | { 17 | public: 18 | Motor(rclcpp::Node::SharedPtr p_node, TmclInterpreter* p_tmcl_interpreter, 19 | uint8_t motor_number, uint32_t module_number); 20 | virtual ~Motor(); 21 | 22 | uint8_t getMotorNumber(); 23 | std::string getMotorName(); 24 | virtual void init(); 25 | 26 | protected: 27 | rclcpp::Node::SharedPtr p_node_; 28 | TmclInterpreter* p_tmcl_interpreter_; 29 | rclcpp::Publisher::SharedPtr publisher_; 30 | rclcpp::TimerBase::SharedPtr publisher_timer_; 31 | rclcpp::Subscription::SharedPtr subscription_cmd_vel_; 32 | rclcpp::Subscription::SharedPtr subscription_cmd_abspos_; 33 | rclcpp::Subscription::SharedPtr subscription_cmd_relpos_; 34 | rclcpp::Subscription::SharedPtr subscription_cmd_trq_; 35 | bool param_en_pub_tmc_info_; 36 | std::string param_tmc_info_topic_; 37 | uint8_t param_pub_rate_tmc_info_; 38 | bool param_pub_actual_vel_; 39 | bool param_pub_actual_pos_; 40 | bool param_pub_actual_trq_; 41 | std::string param_tmc_cmd_vel_topic_; 42 | std::string param_tmc_cmd_abspos_topic_; 43 | std::string param_tmc_cmd_relpos_topic_; 44 | std::string param_tmc_cmd_trq_topic_; 45 | double param_wheel_diameter_; 46 | double param_additional_ratio_vel_; 47 | double param_additional_ratio_pos_; 48 | double param_additional_ratio_trq_; 49 | std::string param_comm_interface_name_; 50 | uint32_t module_number_; 51 | std::string tmc_info_frame_id_; 52 | 53 | void initMotorParams(); 54 | void initPublisherParams(); 55 | virtual void cmdTrqSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg); 56 | private: 57 | uint8_t motor_number_; 58 | 59 | virtual void initPublisher(); 60 | virtual void pubTimerCallback(); 61 | virtual void initSubscriberParams(); 62 | virtual void initSubscribers(); 63 | virtual void cmdVelSubscriberCallback(const geometry_msgs::msg::Twist::SharedPtr msg); 64 | virtual void cmdAbsposSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg); 65 | virtual void cmdRelposSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg); 66 | 67 | }; 68 | 69 | /*******************************************************************************/ 70 | /* Constants and Enumerations */ 71 | /*******************************************************************************/ 72 | 73 | /* Conversion constants */ 74 | 75 | /* Derived from converting linear velocity (ROS velocity unit) to rpm (TMC board velocity unit)*/ 76 | const uint8_t SEC_TO_MIN = 60; 77 | const float PI = 3.1415926535; 78 | 79 | /* Used for converting degrees (general position/angular unit) to steps (TMC board position/angular unit)*/ 80 | const uint16_t ANGULAR_FULL_ROTATION = 360; 81 | 82 | /* Parameter limits and default values */ 83 | const uint8_t PUB_RATE_MIN = 1; 84 | const uint8_t PUB_RATE_MAX = 100; 85 | const uint8_t PUB_RATE_DEFAULT = 10; 86 | 87 | /* LUT row indeces of get-able/set-able ROS Topic-related Parameters */ 88 | typedef enum 89 | { 90 | IDX_EN_PUB_TMC_INFO = 0, 91 | IDX_TMC_INFO_TOPIC, 92 | IDX_PUB_RATE_TMC_INFO, 93 | IDX_PUB_ACTUAL_VEL, 94 | IDX_PUB_ACTUAL_TRQ, 95 | IDX_PUB_ACTUAL_POS, 96 | IDX_TMC_CMD_VEL_TOPIC, 97 | IDX_TMC_CMD_ABSPOS_TOPIC, 98 | IDX_TMC_CMD_RELPOS_TOPIC, 99 | IDX_TMC_CMD_TRQ_TOPIC, 100 | TMCL_ROS_TOPIC_PARAMS_LUT_MAX /* This should not be used */ 101 | }tmcl_ros_topic_params_lut_t; 102 | 103 | /* Parameter Names of get-able/set-able General Parameters */ 104 | static const std::vector ros_topic_params_ = { 105 | "en_pub_tmc_info", 106 | "tmc_info_topic", 107 | "pub_rate_tmc_info", 108 | "pub_actual_vel", 109 | "pub_actual_trq", 110 | "pub_actual_pos", 111 | "tmc_cmd_vel_topic", 112 | "tmc_cmd_abspos_topic", 113 | "tmc_cmd_relpos_topic", 114 | "tmc_cmd_trq_topic", 115 | "MAX" /* This should not be used */ 116 | }; 117 | 118 | /* LUT row indeces of get-able/set-able Hardware Parameters */ 119 | typedef enum 120 | { 121 | IDX_WHEEL_DIAMETER = 0, 122 | TMCL_HARDWARE_PARAMS_LUT_MAX /* This should not be used */ 123 | }tmcl_hardware_params_lut_t; 124 | 125 | /* Parameter Names of get-able/set-able Hardware Parameters */ 126 | static const std::vector hardware_params_ = { 127 | "wheel_diameter", 128 | "MAX" /* This should not be used */ 129 | }; 130 | 131 | /* LUT row indeces of get-able/set-able Additional Ratio Params */ 132 | typedef enum 133 | { 134 | IDX_ADDITIONAL_RATIO_VEL = 0, 135 | IDX_ADDITIONAL_RATIO_POS, 136 | IDX_ADDITIONAL_RATIO_TRQ, 137 | TMCL_ADDITIONAL_RATIO_PARAMS_LUT_MAX /* This should not be used */ 138 | }tmcl_additional_ratio_params_lut_t; 139 | 140 | /* Parameter Names of get-able/set-able Additional Ratio Params */ 141 | static const std::vector additional_ratio_params_ = { 142 | "additional_ratio_vel", 143 | "additional_ratio_pos", 144 | "additional_ratio_trq", 145 | "MAX" /* This should not be used */ 146 | }; 147 | 148 | #endif //TMCL_MOTOR_HPP 149 | -------------------------------------------------------------------------------- /include/adi_tmcl/tmcl_ros2.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef TMCL_ROS2_HPP 7 | #define TMCL_ROS2_HPP 8 | 9 | #include "adi_tmcl/tmcl_bldc_motor.hpp" 10 | #include "adi_tmcl/tmcl_stepper_motor.hpp" 11 | #include "adi_tmcl/srv/tmc_custom_cmd.hpp" 12 | #include "adi_tmcl/srv/tmc_gap_all.hpp" 13 | #include "adi_tmcl/srv/tmc_ggp_all.hpp" 14 | 15 | class TmclRos2 16 | { 17 | public: 18 | TmclRos2(rclcpp::Node::SharedPtr node); 19 | ~TmclRos2(); 20 | 21 | bool init(); 22 | 23 | bool deInit(); 24 | 25 | bool getRetriesExceededStatus(); 26 | 27 | private: 28 | rclcpp::Node::SharedPtr p_node_; 29 | std::vector p_motor_; 30 | TmclInterpreter* p_tmcl_interpreter_; 31 | bool param_adhoc_mode_; 32 | std::vector param_en_motors_; 33 | uint8_t param_auto_start_additional_delay_; 34 | std::vector param_ap_type_; 35 | std::vector param_ap_name_; 36 | std::vector param_gp_type_; 37 | std::vector param_gp_name_; 38 | 39 | rclcpp::Service::SharedPtr tmcl_custom_cmd_service_server_; 40 | rclcpp::Service::SharedPtr tmcl_gap_service_server_; 41 | rclcpp::Service::SharedPtr tmcl_ggp_service_server_; 42 | rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr p_param_callback_handle_; 43 | 44 | uint32_t module_number_; 45 | uint16_t fw_major_; 46 | uint16_t fw_minor_; 47 | bool b_allow_en_motors_change_; 48 | 49 | void initCommInterfaceParams(); 50 | void initGeneralParams(); 51 | bool initAxisAndGlobalParameters(); 52 | void createMotor(); 53 | void initServiceServer(); 54 | void tmclCustomCmdCallback(const std::shared_ptr req, 55 | const std::shared_ptr res); 56 | void tmclGapAllCallback(const std::shared_ptr req, 57 | const std::shared_ptr res); 58 | void tmclGgpAllCallback(const std::shared_ptr req, 59 | const std::shared_ptr res); 60 | rcl_interfaces::msg::SetParametersResult parametersCallback(const std::vector \ 61 | ¶meters); 62 | 63 | }; 64 | 65 | /*******************************************************************************/ 66 | /* Constants and Enumerations */ 67 | /*******************************************************************************/ 68 | 69 | /* Possible values for */ 70 | const uint8_t TMCM_BLDC = 6; 71 | 72 | /* Parameter limits and default values */ 73 | const uint8_t TXRX_ID_MIN = 0; 74 | const uint8_t TXRX_ID_MAX = 255; 75 | const uint8_t TX_ID_DEFAULT = 1; 76 | const uint8_t RX_ID_DEFAULT = 2; 77 | const uint16_t TIMEOUT_MS_MIN = 0; 78 | const uint16_t TIMEOUT_MS_MAX = 5000; 79 | const uint16_t TIMEOUT_MS_DEFAULT = 10; 80 | const uint8_t EXEC_CMD_RETRIES_MAX = 3; 81 | const uint8_t EXEC_CMD_RETRIES_DEFAULT = 1; 82 | 83 | const uint8_t AUTO_START_ADDITIONAL_DELAY_MAX = 60; 84 | const uint8_t AUTO_START_ADDITIONAL_DELAY_DEFAULT = 0; 85 | 86 | /* LUT row indeces of get-able/set-able General Parameters */ 87 | typedef enum 88 | { 89 | IDX_ADHOC_MODE = 0, 90 | IDX_EN_MOTORS, 91 | IDX_AUTO_START_ADDITIONAL_DELAY, 92 | IDX_AXIS_PARAMETERS_TYPE, 93 | IDX_AXIS_PARAMETERS_NAME, 94 | IDX_GLOBAL_PARAMETERS_TYPE, 95 | IDX_GLOBAL_PARAMETERS_NAME, 96 | TMCL_GENERAL_PARAMS_LUT_MAX /* This should not be used */ 97 | }tmcl_general_params_lut_t; 98 | 99 | /* Parameter Names of get-able/set-able General Parameters */ 100 | static const std::vector general_params_ = { 101 | "adhoc_mode", 102 | "en_motors", 103 | "auto_start_additional_delay", 104 | "AP_type", 105 | "AP_name", 106 | "GP_type", 107 | "GP_name", 108 | "MAX" /* This should not be used */ 109 | }; 110 | 111 | /* LUT row indeces of Custom Service Server Commands */ 112 | typedef enum 113 | { 114 | IDX_SAP = 0, 115 | IDX_GAP, 116 | IDX_SGP, 117 | IDX_GGP 118 | }tmcl_custom_cmd_lut_t; 119 | 120 | /* Custom Service Server Commands */ 121 | static const std::vector tmcl_custom_cmd_ = { 122 | "SAP", 123 | "GAP", 124 | "SGP", 125 | "GGP" 126 | }; 127 | 128 | 129 | #endif // TMCL_ROS2_HPP 130 | -------------------------------------------------------------------------------- /include/adi_tmcl/tmcl_stepper_motor.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #ifndef TMCL_STEPPER_MOTOR_HPP 7 | #define TMCL_STEPPER_MOTOR_HPP 8 | 9 | #include "adi_tmcl/tmcl_motor.hpp" 10 | 11 | /*******************************************************************************/ 12 | /* Constants and Enumerations */ 13 | /*******************************************************************************/ 14 | 15 | /* Possible values for */ 16 | typedef enum 17 | { 18 | STEPPER_MODE_OPENLOOP = 0, 19 | STEPPER_MODE_CLOSEDLOOP 20 | } tmcl_stepper_mode_t; 21 | 22 | class StepperMotor : public Motor 23 | { 24 | public: 25 | StepperMotor(rclcpp::Node::SharedPtr p_node, TmclInterpreter* p_tmcl_interpreter, 26 | uint8_t motor_number, uint32_t module_number); 27 | virtual ~StepperMotor(); 28 | 29 | private: 30 | tmcl_stepper_mode_t mode_; 31 | uint32_t motor_full_step_resolution_; 32 | uint16_t microstep_resolution_; 33 | 34 | void init() override; 35 | void initPublisher() override; 36 | void pubTimerCallback() override; 37 | void initSubscriberParams() override; 38 | void initSubscribers() override; 39 | void cmdVelSubscriberCallback(const geometry_msgs::msg::Twist::SharedPtr msg) override; 40 | void cmdAbsposSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg) override; 41 | void cmdRelposSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg) override; 42 | void cmdTrqSubscriberCallback(const std_msgs::msg::Int32::SharedPtr msg) override; 43 | 44 | tmcl_stepper_mode_t getStepperMode(); 45 | }; 46 | 47 | 48 | #endif //TMCL_STEPPER_MOTOR_HPP 49 | -------------------------------------------------------------------------------- /launch/tmcm_0930.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-0930.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-0930_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm0930') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | 49 | # ADI TMCL ROS2 Node 50 | tmcm_0930_node = Node( 51 | package="adi_tmcl", 52 | executable="tmcl_ros2_node", 53 | name="tmcl_ros2_node", 54 | namespace=ns_prefix_, 55 | emulate_tty=True, 56 | parameters=[ 57 | autogenerated_yaml, 58 | ext_yaml], 59 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 60 | ) 61 | 62 | # TF Node 63 | tf_board = Node( 64 | package="tf2_ros", 65 | executable="static_transform_publisher", 66 | name=[tmcl_base_name_,'_link'], 67 | namespace=ns_prefix_, 68 | emulate_tty=True, 69 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 70 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 71 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 72 | ) 73 | 74 | return LaunchDescription([ 75 | arg_log_level, 76 | arg_ns_prefix, 77 | arg_tmcl_base_name, 78 | arg_board_parent_frame, 79 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 80 | tmcm_0930_node, 81 | tf_board, 82 | ]) 83 | -------------------------------------------------------------------------------- /launch/tmcm_1140.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1140.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1140_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1140') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1140_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1140_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1160.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1160.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1160_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1160') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1160_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1160_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1180.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1180.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1180_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1180') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1180_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1180_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1230.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1230.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1230_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1230') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1230_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1230_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1231.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1231.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1231_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1231') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1231_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1231_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1240.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1240.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1240_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1240') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1240_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1240_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1241.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1241.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1241_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1241') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1241_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1241_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1260.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1260.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1260_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1260') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1260_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1260_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1270.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1270.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1270_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1270') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1270_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1270_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1276.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1276.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1276_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1276') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1276_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1276_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /launch/tmcm_1278.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Analog Devices, Inc. All Rights Reserved. 2 | # This software is proprietary to Analog Devices, Inc. and its licensors. 3 | 4 | import os 5 | 6 | from launch import LaunchDescription 7 | from launch_ros.actions import Node 8 | from launch.substitutions import (LaunchConfiguration, PythonExpression) 9 | from launch.actions import DeclareLaunchArgument 10 | from ament_index_python.packages import get_package_share_directory 11 | 12 | def generate_launch_description(): 13 | ## Get directory of config files 14 | tmcl_ros2_pkg_dir = get_package_share_directory('adi_tmcl') 15 | ## Include YAML file 16 | autogenerated_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'autogenerated', 'TMCM-1278.yaml') 17 | ext_yaml = os.path.join(tmcl_ros2_pkg_dir, 'config', 'TMCM-1278_Ext.yaml') 18 | 19 | # Declare the Launch Arguments with default value 20 | arg_log_level = DeclareLaunchArgument('log_level', default_value='INFO') 21 | log_level_ = LaunchConfiguration('log_level') 22 | 23 | arg_ns_prefix = DeclareLaunchArgument('ns_prefix', default_value='tmcm1') 24 | ns_prefix_ = LaunchConfiguration('ns_prefix') 25 | 26 | arg_tmcl_base_name = DeclareLaunchArgument('tmcl_base_name', default_value='tmcm1278') 27 | tmcl_base_name_ = LaunchConfiguration('tmcl_base_name') 28 | 29 | arg_board_parent_frame = DeclareLaunchArgument('board_parent_frame', default_value='map') 30 | arg_board_base_name = DeclareLaunchArgument('board_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_base_link']) 31 | arg_board_pos_x = DeclareLaunchArgument('board_pos_x', default_value='0') 32 | arg_board_pos_y = DeclareLaunchArgument('board_pos_y', default_value='0') 33 | arg_board_pos_z = DeclareLaunchArgument('board_pos_z', default_value='0') 34 | arg_board_pos_qx = DeclareLaunchArgument('board_pos_qx', default_value='0') 35 | arg_board_pos_qy = DeclareLaunchArgument('board_pos_qy', default_value='0') 36 | arg_board_pos_qz = DeclareLaunchArgument('board_pos_qz', default_value='0') 37 | arg_board_pos_qw = DeclareLaunchArgument('board_pos_qw', default_value='1') 38 | 39 | board_parent_frame_ = LaunchConfiguration('board_parent_frame') 40 | board_base_name_ = LaunchConfiguration('board_base_name') 41 | board_pos_x_ = LaunchConfiguration('board_pos_x') 42 | board_pos_y_ = LaunchConfiguration('board_pos_y') 43 | board_pos_z_ = LaunchConfiguration('board_pos_z') 44 | board_pos_qx_ = LaunchConfiguration('board_pos_qx') 45 | board_pos_qy_ = LaunchConfiguration('board_pos_qy') 46 | board_pos_qz_ = LaunchConfiguration('board_pos_qz') 47 | board_pos_qw_ = LaunchConfiguration('board_pos_qw') 48 | # motor0 Arguments 49 | arg_mtr0_base_name = DeclareLaunchArgument('mtr0_base_name', default_value=[ns_prefix_,'/',tmcl_base_name_,'_mtr0_frame']) 50 | arg_mtr0_pos_x = DeclareLaunchArgument('mtr0_pos_x', default_value='0') 51 | arg_mtr0_pos_y = DeclareLaunchArgument('mtr0_pos_y', default_value='1') 52 | arg_mtr0_pos_z = DeclareLaunchArgument('mtr0_pos_z', default_value='0') 53 | arg_mtr0_pos_qx = DeclareLaunchArgument('mtr0_pos_qx', default_value='0') 54 | arg_mtr0_pos_qy = DeclareLaunchArgument('mtr0_pos_qy', default_value='0') 55 | arg_mtr0_pos_qz = DeclareLaunchArgument('mtr0_pos_qz', default_value='0') 56 | arg_mtr0_pos_qw = DeclareLaunchArgument('mtr0_pos_qw', default_value='1') 57 | 58 | mtr0_base_name_ = LaunchConfiguration('mtr0_base_name') 59 | mtr0_pos_x_ = LaunchConfiguration('mtr0_pos_x') 60 | mtr0_pos_y_ = LaunchConfiguration('mtr0_pos_y') 61 | mtr0_pos_z_ = LaunchConfiguration('mtr0_pos_z') 62 | mtr0_pos_qx_ = LaunchConfiguration('mtr0_pos_qx') 63 | mtr0_pos_qy_ = LaunchConfiguration('mtr0_pos_qy') 64 | mtr0_pos_qz_ = LaunchConfiguration('mtr0_pos_qz') 65 | mtr0_pos_qw_ = LaunchConfiguration('mtr0_pos_qw') 66 | 67 | 68 | # ADI TMCL ROS2 Node 69 | tmcm_1278_node = Node( 70 | package="adi_tmcl", 71 | executable="tmcl_ros2_node", 72 | name="tmcl_ros2_node", 73 | namespace=ns_prefix_, 74 | emulate_tty=True, 75 | parameters=[ 76 | autogenerated_yaml, 77 | ext_yaml], 78 | arguments=["--ros-args", "--log-level", PythonExpression(expression=["'",ns_prefix_,".tmcl_ros2_node:=",log_level_,"'"])] 79 | ) 80 | 81 | # TF Node 82 | tf_board = Node( 83 | package="tf2_ros", 84 | executable="static_transform_publisher", 85 | name=[tmcl_base_name_,'_link'], 86 | namespace=ns_prefix_, 87 | emulate_tty=True, 88 | arguments=["--x", board_pos_x_, "--y", board_pos_y_, "--z", board_pos_z_, 89 | "--qx", board_pos_qx_, "--qy", board_pos_qy_, "--qz", board_pos_qz_, "--qw", board_pos_qw_, 90 | "--frame-id", board_parent_frame_, "--child-frame-id", board_base_name_] 91 | ) 92 | 93 | tf_mtr0 = Node( 94 | package="tf2_ros", 95 | executable="static_transform_publisher", 96 | name=[tmcl_base_name_,'_mtr0_link'], 97 | namespace=ns_prefix_, 98 | emulate_tty=True, 99 | arguments=["--x", mtr0_pos_x_, "--y", mtr0_pos_y_, "--z", mtr0_pos_z_, 100 | "--qx", mtr0_pos_qx_, "--qy", mtr0_pos_qy_, "--qz", mtr0_pos_qz_, "--qw", mtr0_pos_qw_, 101 | "--frame-id", board_base_name_, "--child-frame-id", mtr0_base_name_] 102 | ) 103 | 104 | return LaunchDescription([ 105 | arg_log_level, 106 | arg_ns_prefix, 107 | arg_tmcl_base_name, 108 | arg_board_parent_frame, 109 | arg_board_base_name,arg_board_pos_x, arg_board_pos_y, arg_board_pos_z, arg_board_pos_qx, arg_board_pos_qy, arg_board_pos_qz, arg_board_pos_qw, 110 | arg_mtr0_base_name, arg_mtr0_pos_x, arg_mtr0_pos_y, arg_mtr0_pos_z, arg_mtr0_pos_qx, arg_mtr0_pos_qy, arg_mtr0_pos_qz, arg_mtr0_pos_qw, 111 | tmcm_1278_node, 112 | tf_board, 113 | tf_mtr0, 114 | ]) 115 | -------------------------------------------------------------------------------- /msg/TmcInfo.msg: -------------------------------------------------------------------------------- 1 | std_msgs/Header header 2 | string interface_name 3 | float32 board_voltage 4 | int32 status_flag 5 | string status 6 | uint8 motor_num 7 | float32 velocity 8 | int32 position 9 | int32 torque -------------------------------------------------------------------------------- /msg/TmcParam.msg: -------------------------------------------------------------------------------- 1 | string name 2 | int64 value 3 | -------------------------------------------------------------------------------- /package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | adi_tmcl 5 | 2.0.3 6 | The adi_tmcl ROS2 package 7 | Analog Devices 8 | BSD 3-Clause 9 | 10 | ament_cmake 11 | 12 | rclcpp 13 | std_msgs 14 | std_srvs 15 | geometry_msgs 16 | 17 | rclcpp 18 | std_msgs 19 | std_srvs 20 | geometry_msgs 21 | ros2launch 22 | 23 | ament_lint_auto 24 | ament_lint_common 25 | 26 | 27 | rosidl_default_generators 28 | 29 | rosidl_default_runtime 30 | 31 | rosidl_interface_packages 32 | 33 | 34 | ament_cmake 35 | 36 | 37 | -------------------------------------------------------------------------------- /scripts/CAN_deinit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Variable for 2 spaces 4 | SP=`echo " "` 5 | 6 | if [ "$(whoami)" != root ] 7 | then 8 | echo "Please run this script with sudo. Exiting!" 9 | echo "Try sudo $0 -h" 10 | exit 11 | fi 12 | 13 | # Script arguments check 14 | echo "================================================================================" 15 | 16 | while [ ! $# -eq 0 ] 17 | do 18 | case "$1" in 19 | -i) 20 | IF_NAME="$2" 21 | shift 22 | shift 23 | ;; 24 | -h) 25 | echo "Usage ./CAN_deinit.sh []" 26 | echo "where are:" 27 | echo "-i [Interface Name] " 28 | echo " ${SP} -CAN Interface name (e.g. can0)" 29 | echo "" 30 | echo "Examples:" 31 | echo "sudo ./CAN_deinit.sh -i can0" 32 | echo "sudo ./CAN_deinit.sh -i can1" 33 | exit 34 | ;; 35 | *) 36 | shift 37 | ;; 38 | esac 39 | done 40 | 41 | # Validate inputs 42 | if [ -z $IF_NAME ]; then 43 | echo "Error! Missing interface name." 44 | echo "Try sudo $0 -h" 45 | exit 46 | fi 47 | 48 | NETWORK_FILE="99-${IF_NAME}.network" 49 | NETWORK_FILE_DIR="/etc/systemd/network/${NETWORK_FILE}" 50 | 51 | if [ -f $NETWORK_FILE_DIR ]; then 52 | echo "Deinitializing ${NETWORK_FILE_DIR} ..." 53 | echo "Stop systemd-networkd ..." 54 | systemctl stop systemd-networkd 55 | sleep 5 56 | 57 | echo "Removing CAN network file ..." 58 | rm ${NETWORK_FILE_DIR} 59 | 60 | echo "Restarting systemd-networkd ..." 61 | systemctl restart systemd-networkd 62 | sleep 5 63 | 64 | echo "" 65 | echo "Done." 66 | echo "Automatic bring up of $IF_NAME is now disabled" 67 | else 68 | echo "${NETWORK_FILE_DIR} does not exist." 69 | echo "Cannot deinitialize." 70 | fi 71 | echo "================================================================================" -------------------------------------------------------------------------------- /scripts/CAN_init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Variable for 2 spaces 4 | SP=`echo " "` 5 | 6 | if [ "$(whoami)" != root ] 7 | then 8 | echo "Please run this script with sudo. Exiting!" 9 | echo "Try sudo $0 -h" 10 | exit 11 | fi 12 | 13 | # Script arguments check 14 | echo "================================================================================" 15 | 16 | while [ ! $# -eq 0 ] 17 | do 18 | case "$1" in 19 | -i) 20 | IF_NAME="$2" 21 | shift 22 | shift 23 | ;; 24 | -b) 25 | IF_BR="$2" 26 | shift 27 | shift 28 | ;; 29 | -h) 30 | echo "Usage ./CAN_init.sh []" 31 | echo "where are:" 32 | echo "-i [Interface Name] " 33 | echo " ${SP} -CAN Interface name (e.g. can0)" 34 | echo "-b [Bit Rate] " 35 | echo " ${SP} -CAN Bit Rate" 36 | echo " ${SP}${SP}${SP}${SP}where [Bit Rate] can be the following:" 37 | echo " ${SP}${SP}${SP}${SP} 20000" 38 | echo " ${SP}${SP}${SP}${SP} 50000" 39 | echo " ${SP}${SP}${SP}${SP} 100000" 40 | echo " ${SP}${SP}${SP}${SP} 125000" 41 | echo " ${SP}${SP}${SP}${SP} 250000" 42 | echo " ${SP}${SP}${SP}${SP} 500000" 43 | echo " ${SP}${SP}${SP}${SP} 1000000" 44 | echo "-h ${SP} - Get a bit of help about this script" 45 | echo "" 46 | echo "Examples:" 47 | echo "sudo ./CAN_init.sh -i can0 -b 1000000" 48 | echo "sudo ./CAN_init.sh -i can1 -b 500000" 49 | exit 50 | ;; 51 | *) 52 | shift 53 | ;; 54 | esac 55 | done 56 | 57 | # Validate inputs 58 | if [ -z $IF_NAME ]; then 59 | echo "Error! Missing interface name." 60 | echo "Try sudo $0 -h" 61 | exit 62 | elif [ -z $IF_BR ]; then 63 | echo "Error! Missing interface bit rate." 64 | echo "Try sudo $0 -h" 65 | exit 66 | fi 67 | 68 | if [ $IF_BR != 20000 -a $IF_BR != 50000 -a $IF_BR != 100000 -a \ 69 | $IF_BR != 125000 -a $IF_BR != 250000 -a $IF_BR != 500000 -a \ 70 | $IF_BR != 1000000 ] 71 | then 72 | echo "Error! Invalid bit rate." 73 | echo "Try sudo $0 -h" 74 | exit 75 | fi 76 | 77 | # Create a *.network file 78 | NETWORK_FILE="99-${IF_NAME}.network" 79 | echo "Creating $NETWORK_FILE ..." 80 | touch $NETWORK_FILE 81 | echo "[Match]" >> $NETWORK_FILE 82 | echo "Name=$IF_NAME" >> $NETWORK_FILE 83 | echo "[CAN]" >> $NETWORK_FILE 84 | echo "BitRate=$IF_BR" >> $NETWORK_FILE 85 | 86 | # Copy *.network file to /etc/systemd/network 87 | echo "Moving $NETWORK_FILE to /etc/systemd/network ..." 88 | cp $NETWORK_FILE /etc/systemd/network 89 | 90 | # Stop systemd-networkd 91 | echo "Stop systemd-networkd..." 92 | systemctl stop systemd-networkd 93 | sleep 5 94 | 95 | # Enable systemd-networkd 96 | echo "Enabling systemd-networkd..." 97 | systemctl enable systemd-networkd 98 | sleep 5 99 | 100 | # Restart systemd-networkd 101 | echo "Restarting systemd-networkd..." 102 | systemctl restart systemd-networkd 103 | sleep 5 104 | 105 | echo "Removing temporary files..." 106 | rm $NETWORK_FILE 107 | 108 | echo "Done." 109 | echo "$IF_NAME will automatically be brought UP on boot." 110 | 111 | echo "================================================================================" 112 | -------------------------------------------------------------------------------- /scripts/fake_cmd_pos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /opt/ros/humble/setup.bash 4 | 5 | if [ -z "$1" ] 6 | then 7 | topic=/cmd_relpos_0 8 | else 9 | topic=$1 10 | fi 11 | 12 | # Rotating clockwise 13 | val=0 14 | for i in {1..3} 15 | do 16 | val=360 17 | ros2 topic pub $topic std_msgs/msg/Int32 "data: $val" -1 18 | sleep 5 19 | done 20 | 21 | # Rotating counter-clockwise 22 | val=0 23 | for i in {1..3} 24 | do 25 | val=-360 26 | ros2 topic pub $topic std_msgs/msg/Int32 "data: $val" -1 27 | sleep 5 28 | done 29 | -------------------------------------------------------------------------------- /scripts/fake_cmd_trq.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /opt/ros/humble/setup.bash 4 | 5 | if [ -z "$1" ] 6 | then 7 | topic=/cmd_trq_0 8 | else 9 | topic=$1 10 | fi 11 | 12 | val=300 13 | ros2 topic pub $topic std_msgs/msg/Int32 "data: $val" -1 14 | sleep 5 15 | 16 | val=0 17 | ros2 topic pub $topic std_msgs/msg/Int32 "data: $val" -1 18 | sleep 5 19 | 20 | val=300 21 | ros2 topic pub $topic std_msgs/msg/Int32 "data: $val" -1 22 | sleep 5 23 | 24 | val=0 25 | ros2 topic pub $topic std_msgs/msg/Int32 "data: $val" -1 26 | -------------------------------------------------------------------------------- /scripts/fake_cmd_vel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source /opt/ros/humble/setup.bash 4 | 5 | if [ -z "$1" ] 6 | then 7 | topic=/cmd_vel_0 8 | else 9 | topic=$1 10 | fi 11 | 12 | # Increasing speed clockwise 13 | val=0 14 | for i in {1..3} 15 | do 16 | val=`echo $val + 3.0 | bc` 17 | echo $val 18 | ros2 topic pub $topic geometry_msgs/msg/Twist "linear: 19 | x: $val 20 | y: 0.0 21 | z: 0.0 22 | angular: 23 | x: 0.0 24 | y: 0.0 25 | z: 0.0" -1 26 | sleep 5 27 | done 28 | 29 | # Stop for 5secs 30 | ros2 topic pub $topic geometry_msgs/msg/Twist "linear: 31 | x: 0.0 32 | y: 0.0 33 | z: 0.0 34 | angular: 35 | x: 0.0 36 | y: 0.0 37 | z: 0.0" -1 38 | sleep 5 39 | 40 | # Increasing speed counter-clockwise 41 | val=0 42 | for i in {1..3} 43 | do 44 | val=`echo $val - 3.0 | bc` 45 | echo $val 46 | ros2 topic pub $topic geometry_msgs/msg/Twist "linear: 47 | x: $val 48 | y: 0.0 49 | z: 0.0 50 | angular: 51 | x: 0.0 52 | y: 0.0 53 | z: 0.0" -1 54 | sleep 5 55 | done 56 | 57 | # Stop for 5secs 58 | ros2 topic pub $topic geometry_msgs/msg/Twist "linear: 59 | x: 0.0 60 | y: 0.0 61 | z: 0.0 62 | angular: 63 | x: 0.0 64 | y: 0.0 65 | z: 0.0" -1 66 | sleep 5 67 | -------------------------------------------------------------------------------- /src/tmcl_ros2_node.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. 3 | * This software is proprietary to Analog Devices, Inc. and its licensors. 4 | **/ 5 | 6 | #include "rclcpp/logger.hpp" 7 | #include "rclcpp/rclcpp.hpp" 8 | #include "adi_tmcl/tmcl_ros2.hpp" 9 | 10 | TmclRos2 *p_tmcl_ros2 = nullptr; 11 | bool g_shutdown_signal = false; 12 | 13 | void graceful_shutdown(); 14 | void signal_callback_handler(int signum); 15 | 16 | int main(int argc, char ** argv) 17 | { 18 | rclcpp::init(argc,argv); 19 | std::shared_ptr node = rclcpp::Node::make_shared("tmcl_ros2_node"); 20 | 21 | RCLCPP_INFO_STREAM(node->get_logger(),"Starting " << node->get_name() << " ..."); 22 | 23 | RCLCPP_DEBUG_STREAM(node->get_logger(),"Installing new signal handlers..."); 24 | rclcpp::uninstall_signal_handlers(); 25 | std::signal(SIGINT, signal_callback_handler); 26 | std::signal(SIGTERM, signal_callback_handler); 27 | std::signal(SIGABRT, signal_callback_handler); 28 | 29 | try 30 | { 31 | p_tmcl_ros2 = new TmclRos2(node); 32 | 33 | if(p_tmcl_ros2->init()) 34 | { 35 | RCLCPP_INFO_STREAM(node->get_logger(),"Initialization successful."); 36 | while(!g_shutdown_signal && !p_tmcl_ros2->getRetriesExceededStatus()) 37 | { 38 | rclcpp::spin_some(node); 39 | } 40 | RCLCPP_WARN_STREAM(node->get_logger(),"Exiting main loop..."); 41 | throw-1; 42 | } 43 | else 44 | { 45 | RCLCPP_ERROR_STREAM(node->get_logger(),"Error initializing node... shutting down"); 46 | throw-1; 47 | } 48 | } 49 | catch(int exception) 50 | { 51 | RCLCPP_INFO_STREAM(node->get_logger(),"Caught " << exception); 52 | graceful_shutdown(); 53 | } 54 | 55 | return 0; 56 | } 57 | 58 | void graceful_shutdown() 59 | { 60 | RCLCPP_INFO_STREAM(rclcpp::get_logger("tmcl_ros2_node shutdown"),"Initiating graceful shutdown..."); 61 | if(p_tmcl_ros2->deInit()) 62 | { 63 | RCLCPP_INFO_STREAM(rclcpp::get_logger("tmcl_ros2_node shutdown"),"Successfully de-initialized TMC"); 64 | } 65 | delete p_tmcl_ros2; 66 | p_tmcl_ros2 = nullptr; 67 | RCLCPP_INFO_STREAM(rclcpp::get_logger("tmcl_ros2_node shutdown"),"Successfully shutdown..."); 68 | rclcpp::shutdown(); 69 | } 70 | 71 | void signal_callback_handler(int signum) 72 | { 73 | RCLCPP_INFO_STREAM(rclcpp::get_logger("tmcl_ros2_node shutdown"),"Caught signal: " << signum << ". Terminating..."); 74 | g_shutdown_signal = true; 75 | 76 | // Implement graceful shutdown if SIGABRT is received 77 | // After SIGABRT, process will be killed/terminated and will not go back to main loop 78 | if(SIGABRT==signum) 79 | { 80 | graceful_shutdown(); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /srv/TmcCustomCmd.srv: -------------------------------------------------------------------------------- 1 | string instruction 2 | uint8 instruction_type 3 | uint8 motor_num 4 | int32 value 5 | --- 6 | int32 output 7 | bool result -------------------------------------------------------------------------------- /srv/TmcGapAll.srv: -------------------------------------------------------------------------------- 1 | uint8 motor_num 2 | --- 3 | bool success 4 | TmcParam[] param -------------------------------------------------------------------------------- /srv/TmcGgpAll.srv: -------------------------------------------------------------------------------- 1 | --- 2 | bool success 3 | TmcParam[] param --------------------------------------------------------------------------------