Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add speedup of robot motions #170

Open
wants to merge 4 commits into
base: projects/piloting
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions moma_mission/config/state_machine/piloting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,15 @@ GRASP_VALVE:
section: "first"
timeout: 15.0
delay: 1.0
linear_speed: 0.01
linear_speed: 0.02

MANIPULATE_VALVE:
default_outcome: None
mode: pose
linear_speed: 0.1
angular_speed: 1.0
linear_speed: 0.4
angular_speed: 1.5
linear_tolerance: 0.05
angular_tolerance: 0.18
control_frame: panda_link0
pose_topic: "/panda/cartesian_impedance_controller/equilibrium_pose"
manager_namespace: panda
Expand Down
3 changes: 2 additions & 1 deletion moma_mission/demo/piloting.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@
valve_sequence.add(
"STORE_FINAL_POSE",
TransformRecorderState,
transitions={"Completed": "APPROACH_FINAL_POSE", "Failure": "Failure"},
# transitions={"Completed": "APPROACH_FINAL_POSE", "Failure": "Failure"},
transitions={"Completed": "OPEN_GRIPPER", "Failure": "Failure"},
)

rospy.loginfo("Approach final pose")
Expand Down
2 changes: 1 addition & 1 deletion moma_mission/src/moma_mission/states/gripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _set_goal(self):
self.gripper_goal.epsilon.outer = (
1.0 # how much fingers can open more than specified
)
self.gripper_goal.speed = 0.01
self.gripper_goal.speed = 0.1
self.gripper_goal.width = self.position
self.gripper_goal.force = self.max_effort

Expand Down
12 changes: 8 additions & 4 deletions moma_mission/src/moma_mission/states/path_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def __init__(self, ns):
self.timeout = self.get_scoped_param("timeout", 0)
self.timeout_factor = self.get_scoped_param("timeout_factor", 2)
self.delay = self.get_scoped_param("delay", 2.0)
self.linear_speed = self.get_scoped_param("linear_speed", 0.1) # m/s
self.angular_speed = self.get_scoped_param("angular_speed", 0.5) # rad/s
self.linear_speed = self.get_scoped_param("linear_speed", 0.3) # m/s
self.angular_speed = self.get_scoped_param("angular_speed", 0.8) # rad/s
self.linear_tolerance = self.get_scoped_param("linear_tolerance", 0.02)
self.angular_tolerance = self.get_scoped_param("angular_tolerance", 0.1)
self.section = self.get_scoped_param("section", "all") # "first", "last"
Expand Down Expand Up @@ -71,8 +71,12 @@ def _poses_msg(self, msg: PoseArray):
self.poses = msg

def run(self):
# Wait for poses callback to be triggered in case of latching
rospy.sleep(2.0)
for i in range(200):
if self.poses is not None:
break
# Wait for poses callback to be triggered in case of latching
rospy.sleep(0.01)

if self.poses is None:
rospy.logerr(f"No poses received yet, can't publish path")
return "Failure"
Expand Down
2 changes: 1 addition & 1 deletion moma_piloting.repos
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories:
object_keypoints_ros:
type: git
url: [email protected]:ethz-asl/object_keypoints_ros.git
version: 4862b6fae5df4f18cec0973f1844f79f1c10572f
version: ccf068fa88066ba7dad11ee27ec885e9c291daed

cartographer:
type: git
Expand Down
8 changes: 4 additions & 4 deletions moma_robot/config/controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ joint_space_controller:
- panda_joint7
lower_limit: [-2.8973, -1.7628, -2.8973, -3.0718, -2.8973, -0.0175, -2.8973]
upper_limit: [2.8973, 1.7628, 2.8973, -0.0698, 2.8973, 3.7525, 2.8973]
max_velocity: 0.3
max_acceleration: 0.1
max_velocity: 0.6
max_acceleration: 0.15
gain: 1.0
tolerance: 0.017 # 1 deg
pid_gains:
Expand Down Expand Up @@ -69,8 +69,8 @@ joint_velocity_controller:
lower_limit: [-2.8973, -1.7628, -2.8973, -3.0718, -2.8973, -0.0175, -2.8973]
upper_limit: [2.8973, 1.7628, 2.8973, -0.0698, 2.8973, 3.7525, 2.8973]
safety_margin: 0.1
max_velocity: 0.3
max_acceleration: 0.1
max_velocity: 0.6
max_acceleration: 0.15
max_deceleration: 0.3
gain: 1.0

Expand Down
8 changes: 4 additions & 4 deletions panda_control/config/controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ joint_space_controller:
- panda_joint7
lower_limit: [-2.8973, -1.7628, -2.8973, -3.0718, -2.8973, -0.0175, -2.8973]
upper_limit: [2.8973, 1.7628, 2.8973, -0.0698, 2.8973, 3.7525, 2.8973]
max_velocity: 0.3
max_acceleration: 0.1
max_velocity: 0.6
max_acceleration: 0.15
gain: 1.0
tolerance: 0.017 # 1 deg
pid_gains:
Expand Down Expand Up @@ -59,8 +59,8 @@ joint_velocity_controller:
lower_limit: [-2.8973, -1.7628, -2.8973, -3.0718, -2.8973, -0.0175, -2.8973]
upper_limit: [2.8973, 1.7628, 2.8973, -0.0698, 2.8973, 3.7525, 2.8973]
safety_margin: 0.1
max_velocity: 0.3
max_acceleration: 0.1
max_velocity: 0.6
max_acceleration: 0.15
max_deceleration: 0.3
gain: 1.0

Expand Down
Loading