Interbotix / interbotix_ros_manipulators

ROS Packages for Interbotix Arms
BSD 3-Clause "New" or "Revised" License
130 stars 86 forks source link

[Bug]: PS4 joystick overload #222

Closed YumTaha closed 3 weeks ago

YumTaha commented 2 months ago

What happened?

Using the PS4 controller, the home and sleep buttons generally work well, but occasionally the controller malfunctions, causing the motors to go fast and overload and the device to disconnect.

Robot Model

vx300

Operating System

Ubuntu 20.04

ROS Distro

ROS 2 Galactic

Steps To Reproduce

No response

Relevant log output

pibot@pibot:~$ ros2 launch interbotix_xsarm_joy xsarm_joy.launch.py robot_model:=vx300
[INFO] [launch]: All log files can be found below /home/pibot/.ros/log/2024-09-13-13-16-06-147805-pibot-2692
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [xs_sdk-1]: process started with pid [2700]
[INFO] [robot_state_publisher-2]: process started with pid [2702]
[INFO] [rviz2-3]: process started with pid [2704]
[INFO] [joy_node-4]: process started with pid [2706]
[INFO] [xsarm_joy-5]: process started with pid [2708]
[INFO] [xsarm_robot.py-6]: process started with pid [2720]
[xs_sdk-1] [INFO] Using Interbotix X-Series Driver Version: 'v0.3.3'.
[xs_sdk-1] [INFO] Using logging level 'INFO'.
[xs_sdk-1] [INFO] Loaded mode configs from '/home/pibot/interbotix_ws/install/interbotix_xsarm_joy/share/interbotix_xsarm_joy/config/modes.yaml'.
[xs_sdk-1] [INFO] Loaded motor configs from '/home/pibot/interbotix_ws/install/interbotix_xsarm_control/share/interbotix_xsarm_control/config/vx300.yaml'.
[xs_sdk-1] [INFO] Pinging all motors specified in the motor_config file. (Attempt 1/3)
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  7, Model: 'XM430-W350', Joint Name: 'wrist_rotate'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  6, Model: 'XM540-W270', Joint Name: 'wrist_angle'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  5, Model: 'XM540-W270', Joint Name: 'elbow_shadow'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  4, Model: 'XM540-W270', Joint Name: 'elbow'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  2, Model: 'XM540-W270', Joint Name: 'shoulder'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  8, Model: 'XM430-W350', Joint Name: 'gripper'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  3, Model: 'XM540-W270', Joint Name: 'shoulder_shadow'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  1, Model: 'XM540-W270', Joint Name: 'waist'.
[joy_node-4] [INFO] [1726247769.851685079] [vx300.joy_node]: Opened joystick: Sony Interactive Entertainment Wireless Controller.  deadzone: 0.050000
[xs_sdk-1] [WARN] Writing startup register values to EEPROM. This only needs to be done once on a robot if using a default motor config file, or after a motor config file has been modified. Can set `write_eeprom_on_startup` to false from now on.
[xs_sdk-1] [INFO] The operating mode for the 'arm' group was changed to 'position' with profile type 'time'.
[xs_sdk-1] [INFO] The operating mode for the 'gripper' joint was changed to 'pwm' with profile type 'velocity'.
[xs_sdk-1] [INFO] Interbotix X-Series Driver is up!
[xs_sdk-1] [INFO] [1726247771.065252338] [interbotix_xs_sdk.xs_sdk]: InterbotixRobotXS is up!
[xsarm_robot.py-6] [INFO] [1726247772.353244658] [vx300.robot_manipulation]: 
[xsarm_robot.py-6]  Robot Name: vx300
[xsarm_robot.py-6]  Robot Model: vx300
[xsarm_robot.py-6] [INFO] [1726247772.357409479] [vx300.robot_manipulation]: Initialized InterbotixRobotXSCore!
[xsarm_robot.py-6] [INFO] [1726247772.407188050] [vx300.robot_manipulation]: 
[xsarm_robot.py-6]  Arm Group Name: arm
[xsarm_robot.py-6]  Moving Time: 0.20 seconds
[xsarm_robot.py-6]  Acceleration Time: 0.10 seconds
[xsarm_robot.py-6]  Drive Mode: Time-Based-Profile
[xsarm_robot.py-6] [INFO] [1726247772.412418951] [vx300.robot_manipulation]: Initialized InterbotixArmXSInterface!
[xsarm_robot.py-6] [INFO] [1726247772.943281318] [vx300.robot_manipulation]: 
[xsarm_robot.py-6]  Gripper Name: gripper
[xsarm_robot.py-6]  Gripper Pressure: 50.0%
[xsarm_robot.py-6] [INFO] [1726247772.948128365] [vx300.robot_manipulation]: Initialized InterbotixGripperXSInterface!
[xsarm_robot.py-6] [INFO] [1726247773.471251819] [vx300.robot_manipulation]: Ready to receive processed joystick commands.
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] [TxRxResult] There is no status packet!
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
[xs_sdk-1] [ERROR] groupSyncRead getdata failed
...

Additional Info

No response

YumTaha commented 2 months ago

Another issue I'm facing is that changes made to the config file for the joy node don't seem to take effect. For instance, the modes.yaml file located at '/home/pibot/interbotix_ws/install/interbotix_xsarm_joy/share/interbotix_xsarm_joy/config/modes.yaml' specifies a profile_velocity of 1500. However, the output shows a profile_velocity of 2000 and a "Moving Time: 0.20 seconds," which is puzzling. Isn't the config file supposed to be the one that gets loaded?

below is modes.yaml in /home/pibot/interbotix_ws/install/interbotix_xsarm_joy/share/interbotix_xsarm_joy/config/

groups:
  arm:
    operating_mode: position
    profile_type: time
    profile_velocity: 1500
    profile_acceleration: 100
    torque_enable: true

singles:
  gripper:
    operating_mode: pwm
    torque_enable: true

output

pibot@pibot:~/interbotix_ws$ ros2 launch interbotix_xsarm_joy xsarm_joy.launch.py robot_model:=vx300 xs_driver_logging_level:=DEBUG use_rviz:=false write_eeprom_on_startup:=false
[INFO] [launch]: All log files can be found below /home/pibot/.ros/log/2024-09-13-14-11-04-031144-pibot-12653
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [xs_sdk-1]: process started with pid [12660]
[INFO] [robot_state_publisher-2]: process started with pid [12662]
[INFO] [joy_node-3]: process started with pid [12664]
[INFO] [xsarm_joy-4]: process started with pid [12666]
[INFO] [xsarm_robot.py-5]: process started with pid [12668]
[xs_sdk-1] [INFO] Using Interbotix X-Series Driver Version: 'v0.3.3'.
[xs_sdk-1] [DEBUG] Set logging level to 0.
[xs_sdk-1] [INFO] Using logging level 'DEBUG'.
[xs_sdk-1] [INFO] Loaded mode configs from '/home/pibot/interbotix_ws/install/interbotix_xsarm_joy/share/interbotix_xsarm_joy/config/modes.yaml'.
[xs_sdk-1] [INFO] Loaded motor configs from '/home/pibot/interbotix_ws/install/interbotix_xsarm_control/share/interbotix_xsarm_control/config/vx300.yaml'.
[xs_sdk-1] [INFO] Pinging all motors specified in the motor_config file. (Attempt 1/3)
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  7, Model: 'XM430-W350', Joint Name: 'wrist_rotate'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  6, Model: 'XM540-W270', Joint Name: 'wrist_angle'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  5, Model: 'XM540-W270', Joint Name: 'elbow_shadow'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  4, Model: 'XM540-W270', Joint Name: 'elbow'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  2, Model: 'XM540-W270', Joint Name: 'shoulder'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  8, Model: 'XM430-W350', Joint Name: 'gripper'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  3, Model: 'XM540-W270', Joint Name: 'shoulder_shadow'.
[xs_sdk-1] [INFO]   Found DYNAMIXEL ID:  1, Model: 'XM540-W270', Joint Name: 'waist'.
[joy_node-3] [INFO] [1726251068.695546687] [vx300.joy_node]: Opened joystick: Sony Interactive Entertainment Wireless Controller.  deadzone: 0.050000
[xs_sdk-1] [WARN] Writing startup register values to EEPROM. This only needs to be done once on a robot if using a default motor config file, or after a motor config file has been modified. Can set `write_eeprom_on_startup` to false from now on.
[xs_sdk-1] [DEBUG] ID: 1, torqued off.
[xs_sdk-1] [DEBUG] ID: 1, read Drive_Mode [00000000].
[xs_sdk-1] [DEBUG] ID: 1, write Drive_Mode [00000100].
[xs_sdk-1] [DEBUG] ID: 1, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 1, torqued on.
[xs_sdk-1] [DEBUG] ID: 2, torqued off.
[xs_sdk-1] [DEBUG] ID: 2, read Drive_Mode [00000001].
[xs_sdk-1] [DEBUG] ID: 2, write Drive_Mode [00000101].
[xs_sdk-1] [DEBUG] ID: 2, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 3, read Drive_Mode [00000000].
[xs_sdk-1] [DEBUG] ID: 3, write Drive_Mode [00000100].
[xs_sdk-1] [DEBUG] ID: 3, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 2, torqued on.
[xs_sdk-1] [DEBUG] ID: 4, torqued off.
[xs_sdk-1] [DEBUG] ID: 4, read Drive_Mode [00000001].
[xs_sdk-1] [DEBUG] ID: 4, write Drive_Mode [00000101].
[xs_sdk-1] [DEBUG] ID: 4, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 5, read Drive_Mode [00000000].
[xs_sdk-1] [DEBUG] ID: 5, write Drive_Mode [00000100].
[xs_sdk-1] [DEBUG] ID: 5, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 4, torqued on.
[xs_sdk-1] [DEBUG] ID: 6, torqued off.
[xs_sdk-1] [DEBUG] ID: 6, read Drive_Mode [00000001].
[xs_sdk-1] [DEBUG] ID: 6, write Drive_Mode [00000101].
[xs_sdk-1] [DEBUG] ID: 6, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 6, torqued on.
[xs_sdk-1] [DEBUG] ID: 7, torqued off.
[xs_sdk-1] [DEBUG] ID: 7, read Drive_Mode [00000000].
[xs_sdk-1] [DEBUG] ID: 7, write Drive_Mode [00000100].
[xs_sdk-1] [DEBUG] ID: 7, set mode position, prof_vel=2000, prof_acc=100.
[xs_sdk-1] [DEBUG] ID: 7, torqued on.
[xs_sdk-1] [INFO] The operating mode for the 'arm' group was changed to 'position' with profile type 'time'.
[xs_sdk-1] [DEBUG] ID: 8, torqued off.
[xs_sdk-1] [DEBUG] ID: 8, read Drive_Mode [00000000].
[xs_sdk-1] [DEBUG] ID: 8, set mode pwm.
[xs_sdk-1] [DEBUG] ID: 8, torqued on.
[xs_sdk-1] [INFO] The operating mode for the 'gripper' joint was changed to 'pwm' with profile type 'velocity'.
[xs_sdk-1] [INFO] Interbotix X-Series Driver is up!
[xs_sdk-1] [INFO] [1726251069.919204620] [interbotix_xs_sdk.xs_sdk]: InterbotixRobotXS is up!
[xsarm_robot.py-5] [INFO] [1726251070.123790966] [vx300.robot_manipulation]: 
[xsarm_robot.py-5]  Robot Name: vx300
[xsarm_robot.py-5]  Robot Model: vx300
[xsarm_robot.py-5] [INFO] [1726251070.126369471] [vx300.robot_manipulation]: Initialized InterbotixRobotXSCore!
[xsarm_robot.py-5] [INFO] [1726251070.160511532] [vx300.robot_manipulation]: 
[xsarm_robot.py-5]  Arm Group Name: arm
[xsarm_robot.py-5]  Moving Time: 0.20 seconds
[xsarm_robot.py-5]  Acceleration Time: 0.10 seconds
[xsarm_robot.py-5]  Drive Mode: Time-Based-Profile
[xsarm_robot.py-5] [INFO] [1726251070.163881959] [vx300.robot_manipulation]: Initialized InterbotixArmXSInterface!
[xsarm_robot.py-5] [INFO] [1726251070.688750690] [vx300.robot_manipulation]: 
[xsarm_robot.py-5]  Gripper Name: gripper
[xsarm_robot.py-5]  Gripper Pressure: 50.0%
[xsarm_robot.py-5] [INFO] [1726251070.693398443] [vx300.robot_manipulation]: Initialized InterbotixGripperXSInterface!
[xsarm_robot.py-5] [INFO] [1726251071.219088522] [vx300.robot_manipulation]: Ready to receive processed joystick commands.