mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
fix: (headless) make new arm controls useable
This commit is contained in:
Submodule src/astra_descriptions updated: 078ec913d7...add9e47469
@@ -358,20 +358,22 @@ class Headless(Node):
|
|||||||
# X: _
|
# X: _
|
||||||
# Y: linear actuator
|
# Y: linear actuator
|
||||||
|
|
||||||
|
ARM_THRESHOLD = 0.2
|
||||||
|
|
||||||
# Right stick: EF yaw and axis 3
|
# Right stick: EF yaw and axis 3
|
||||||
arm_input.effector_yaw = (
|
arm_input.effector_yaw = (
|
||||||
0 if right_stick_x == 0 else int(copysign(1, right_stick_x))
|
0 if abs(right_stick_x) < ARM_THRESHOLD else int(copysign(1, right_stick_x))
|
||||||
)
|
)
|
||||||
arm_input.axis3 = (
|
arm_input.axis3 = (
|
||||||
0 if right_stick_y == 0 else int(copysign(-1, right_stick_y))
|
0 if abs(right_stick_y) < ARM_THRESHOLD else int(-1 * copysign(1, right_stick_y))
|
||||||
)
|
)
|
||||||
|
|
||||||
# Left stick: axis 1 and 2
|
# Left stick: axis 1 and 2
|
||||||
arm_input.axis1 = (
|
arm_input.axis1 = (
|
||||||
0 if left_stick_x == 0 else int(copysign(1, left_stick_x))
|
0 if abs(left_stick_x) < ARM_THRESHOLD else int(copysign(1, left_stick_x))
|
||||||
)
|
)
|
||||||
arm_input.axis2 = (
|
arm_input.axis2 = (
|
||||||
0 if left_stick_y == 0 else int(copysign(-1, left_stick_y))
|
0 if abs(left_stick_y) < ARM_THRESHOLD else int(-1 * copysign(1, left_stick_y))
|
||||||
)
|
)
|
||||||
|
|
||||||
# D-pad: axis 0 and _
|
# D-pad: axis 0 and _
|
||||||
|
|||||||
Reference in New Issue
Block a user