smooth movement of the gripper
This commit is contained in:
parent
c891c2c741
commit
1ffa81cfba
@ -1,7 +1,7 @@
|
|||||||
ps5_servo_node:
|
ps5_servo_node:
|
||||||
ros__parameters:
|
ros__parameters:
|
||||||
linear_speed_multiplier: 0.5
|
linear_speed_multiplier: 0.5
|
||||||
gripper_position_multiplier: 0.006
|
gripper_position_multiplier: 0.01
|
||||||
gripper_cycle_time: 0.01
|
gripper_cycle_time: 0.25
|
||||||
gripper_lower_limit: 0.0
|
gripper_lower_limit: 0.0
|
||||||
gripper_upper_limit: 0.14
|
gripper_upper_limit: 0.14
|
@ -124,7 +124,7 @@ class PS5ControllerNode(Node):
|
|||||||
|
|
||||||
def publish_gripper_command(self):
|
def publish_gripper_command(self):
|
||||||
if self.gripper_cmd is not None:
|
if self.gripper_cmd is not None:
|
||||||
|
self.get_logger().debug(f'Publishing gripper command: {self.gripper_cmd}')
|
||||||
new_gripper_position = self.gripper_cmd + self.last_gripper_gap
|
new_gripper_position = self.gripper_cmd + self.last_gripper_gap
|
||||||
if new_gripper_position >= self.gripper_upper_limit:
|
if new_gripper_position >= self.gripper_upper_limit:
|
||||||
new_gripper_position = self.gripper_upper_limit
|
new_gripper_position = self.gripper_upper_limit
|
||||||
@ -135,7 +135,7 @@ class PS5ControllerNode(Node):
|
|||||||
self.gripper_cmd = 0.0
|
self.gripper_cmd = 0.0
|
||||||
gripper_msg = ForwardCommand()
|
gripper_msg = ForwardCommand()
|
||||||
gripper_msg.position = new_gripper_position
|
gripper_msg.position = new_gripper_position
|
||||||
gripper_msg.max_velocity = 0.1
|
gripper_msg.max_velocity = 0.01
|
||||||
gripper_msg.max_effort = 235.0
|
gripper_msg.max_effort = 235.0
|
||||||
self.gripper_cmd_pub.publish(gripper_msg)
|
self.gripper_cmd_pub.publish(gripper_msg)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user