Skip to content
Snippets Groups Projects
Commit 7a11fa11 authored by Kai Junge's avatar Kai Junge
Browse files

Removed gamepad recording stuff from previous commit for cleaning up.

parent eb0a4db4
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,6 @@ class AVPTeleopNode(Node):
# Publisher
self.franka_pose_publisher = self.create_publisher(Float64MultiArray, '/franka/pose_demand', 10)
self.wrist_servo_demand_publisher = self.create_publisher(Float64MultiArray, '/wrist/servo_demand', 10)
self.exp_status_publisher = self.create_publisher(String, '/exp_status', 10)
# Gamepad
self.gp = GamepadFunctions()
......@@ -278,34 +277,6 @@ class AVPTeleopNode(Node):
msg.data = franka_demand
self.franka_pose_publisher.publish(msg)
def timer_callback(self):
if self.gp.button_data["left"] == 1 and (self.teleop_timer is None):
self.teleop_timer = time.time()
msg = String(); msg.data = "Timer start"
self.exp_status_publisher.publish(msg)
if self.gp.button_data["left"] == 0 and (self.teleop_timer is not None):
if self.teleop_timer > 1:
print(round(time.time() - self.teleop_timer, 3))
self.teleop_timer = None
msg = String(); msg.data = "Timer end"
self.exp_status_publisher.publish(msg)
if self.gp.button_data["circle"] == 1:
print("Success!")
msg = String(); msg.data = "Success"
self.exp_status_publisher.publish(msg)
if self.gp.button_data["cross"] == 1:
print("Fail!")
msg = String(); msg.data = "Fail"
self.exp_status_publisher.publish(msg)
if self.gp.button_data["square"] == 1:
print("Disgard!")
msg = String(); msg.data = "Disgard"
self.exp_status_publisher.publish(msg)
def main():
rclpy.init()
node = AVPTeleopNode()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment