Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TxRxResult] Port is in use! error working with XC330-M288T on ROS2 Humble #88

Open
soham2560 opened this issue May 11, 2024 · 1 comment · May be fixed by #89
Open

[TxRxResult] Port is in use! error working with XC330-M288T on ROS2 Humble #88

soham2560 opened this issue May 11, 2024 · 1 comment · May be fixed by #89

Comments

@soham2560
Copy link

soham2560 commented May 11, 2024

System Info

  • ROS2 Humble
  • XC330-M288T x1 in Position Control Mode
  • With Joint Trajectory Controller
  • Using branch humble
  • Using ros-humble-dynamixel-workbench*
  • Using ros-humble-dynamixel-sdk

I am encountering the following errors in my log

[INFO] [launch]: All log files can be found below /home/container_user/.ros/log/2024-05-11-14-00-18-474799-E14-7727
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ros2_control_node-1]: process started with pid [7736]
[INFO] [robot_state_publisher-2]: process started with pid [7738]
[INFO] [spawner-3]: process started with pid [7740]
[ros2_control_node-1] [INFO] [1715416218.928573690] [robot.controller_manager]: Subscribing to '~/robot_description' topic for robot description file.
[ros2_control_node-1] [INFO] [1715416218.929964564] [robot.controller_manager]: update rate is 200 Hz
[ros2_control_node-1] [INFO] [1715416218.930277923] [robot.controller_manager]: RT kernel is recommended for better performance
[robot_state_publisher-2] [INFO] [1715416218.978141700] [robot.robot_state_publisher]: got segment wheel_link
[robot_state_publisher-2] [INFO] [1715416218.978346253] [robot.robot_state_publisher]: got segment world
[ros2_control_node-1] [INFO] [1715416219.144636252] [robot.controller_manager]: Received robot description file.
[ros2_control_node-1] [INFO] [1715416219.146690928] [resource_manager]: Loading hardware 'Wheel' 
[ros2_control_node-1] [INFO] [1715416219.148623249] [resource_manager]: Initialize hardware 'Wheel' 
[ros2_control_node-1] [INFO] [1715416219.149287259] [DynamixelHardware]: joint_id 0: 101
[ros2_control_node-1] [INFO] [1715416219.149321060] [DynamixelHardware]: usb_port: /dev/ttyUSB0
[ros2_control_node-1] [INFO] [1715416219.149333352] [DynamixelHardware]: baud_rate: 57600
[ros2_control_node-1] [INFO] [1715416219.213230954] [DynamixelHardware]: Position control
[ros2_control_node-1] [INFO] [1715416219.229221121] [DynamixelHardware]: Torque enabled
[ros2_control_node-1] [INFO] [1715416219.229490831] [resource_manager]: Successful initialization of hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.229742245] [resource_manager]: 'configure' hardware 'Wheel' 
[ros2_control_node-1] [INFO] [1715416219.236202030] [resource_manager]: Successful 'configure' of hardware 'Wheel'
[ros2_control_node-1] [INFO] [1715416219.236272636] [resource_manager]: 'activate' hardware 'Wheel' 
[ros2_control_node-1] [ERROR] [1715416219.240448750] [DynamixelHardware]: [TxRxResult] Port is in use!
[ros2_control_node-1] [ERROR] [1715416219.240558395] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-1] [ERROR] [1715416219.240573689] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-1] [ERROR] [1715416219.240585910] [DynamixelHardware]: groupSyncRead getdata failed
[ros2_control_node-1] [ERROR] [1715416219.240726423] [DynamixelHardware]: [TxRxResult] Port is in use!
[ros2_control_node-1] [ERROR] [1715416219.245845826] [DynamixelHardware]: groupSyncWrite addparam failed

I am however able to control the motor using Dynamixel Wizard 2.0

@soham2560
Copy link
Author

I seem to have solved this issue, it was a combination of below

  • Too high controller frequency
    • Was running at 200hz, the errors went away when brought down to 10hz
  • Latency Setting not setup according to u2d2 settings
    • Once the latency was set to 1ms, the max frequency jumped to around 40-50hz

I believe one of the reasons for this is that the read and write functions are called once init fucntion is done, if we can delay till after on activate function, this problems go away at 200hz+ on my system, will put a pr for the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant