UM-ARM-Lab / kuka_iiwa_interface

Developmental controllers for the IIWA 7 robot, including a Catkinized version of the Kuka FRI SDK
BSD 2-Clause "Simplified" License
7 stars 4 forks source link

Handle differing joystick input messages #101

Closed a-price closed 5 years ago

a-price commented 5 years ago

Depending on the OS/USB driver, the joystick message may or may not have button inputs for the D-pad. When a D-pad message is received, the node errors with the following:

[rosout]: bad callback: <bound method VictorJoystick.joy_callback of <__main__.VictorJoystick instance at 0x7f2208ab7fc8>>
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/armlab/catkin_ws/src/kuka_iiwa_interface/victor_hardware_interface/scripts/xbox_control.py", line 95, in joy_callback
    joy = XboxJoy(joy_msg)
  File "/home/armlab/catkin_ws/src/kuka_iiwa_interface/victor_hardware_interface/scripts/xbox_control.py", line 13, in __init__
    A, B, X, Y, LB, RB, back, start, power, stick_button_left, stick_button_right = joy_msg.buttons#, \
ValueError: too many values to unpack
a-price commented 5 years ago

@dmcconachie Is this fixed by PR #102?

dmcconachie commented 5 years ago

No; instead the interface explicitly assumes that we are using xboxdrv with a particular set of settings rather than xpad. Once we get the new wireless receivers in and working I plan to document those settings. Not sure it's worth our time to add support for both xpad and xboxdrv.

a-price commented 5 years ago

Ok, so long as it's documented which driver to use I'm fine with only supporting that one.

dmcconachie commented 5 years ago

https://github.com/UM-ARM-Lab/documentation/wiki/realtime.local-Joystick-Configuration