117 Publishes the teleop command.
121 twist = TwistStamped()
122 twist.twist.linear.z = data.axes[self.
device_config.Axes.RIGHT_STICK_Y]
123 twist.twist.linear.y = data.axes[self.
device_config.Axes.RIGHT_STICK_X]
125 lin_x_right = -0.5 * (data.axes[self.
device_config.Axes.RIGHT_TRIGGER])
126 lin_x_left = 0.5 * (data.axes[self.
device_config.Axes.LEFT_TRIGGER])
127 twist.twist.linear.x = lin_x_right + lin_x_left
129 twist.twist.angular.y = data.axes[self.
device_config.Axes.LEFT_STICK_Y]
130 twist.twist.angular.x = data.axes[self.
device_config.Axes.LEFT_STICK_X]
133 roll_negative = -1 * data.buttons[self.
device_config.Buttons.L1]
134 twist.twist.angular.z = float(roll_positive + roll_negative)
137 twist.header.stamp = self.get_clock().now().to_msg()
139 except Exception
as e: