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

Base fast motion sentry doesn't impact velocity control #311

Open
hello-binit opened this issue May 2, 2024 · 0 comments
Open

Base fast motion sentry doesn't impact velocity control #311

hello-binit opened this issue May 2, 2024 · 0 comments
Assignees

Comments

@hello-binit
Copy link
Contributor

Stretch Body's mobile base has a sentry that sets fast_motion_allowed based on the position of the arm. When the mass is low (i.e. the arm is tucked), the robot is more stable, and fast base motion is allowed. When the mass is high (i.e. the arm is up and extended), the robot is more unstable, and fast base motion is disabled. The sentry logic is:

if ((x_lift < self.params['sentry_max_velocity']['max_lift_height_m']) and
(x_arm < self.params['sentry_max_velocity']['max_arm_extension_m']) and
(x_wrist > self.params['sentry_max_velocity']['min_wrist_yaw_rad'])):
if not self.fast_motion_allowed:
self.logger.debug('Fast motion turned on')
self.fast_motion_allowed = True
else:
if self.fast_motion_allowed:
self.logger.debug('Fast motion turned off')
self.fast_motion_allowed = False

However, the fast_motion_allowed variable is only used by Base.translate_by() and Base.rotate_by(), the two position control method available through Stretch Body. It is not used by Base.set_velocity(), the velocity control method. To complete the functionality intended by this safety feature, we should utilize the fast_motion_allowed variable within set_velocity(). Any duplication feature within GamepadTeleop should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants