Command position with maximum allowed velocity

Questions about our Python API
Post Reply
HD-Lab_Rasmus
Posts: 5
Joined: Tue Feb 16, 2021 12:31 pm

Command position with maximum allowed velocity

Post by HD-Lab_Rasmus » Wed Mar 03, 2021 7:28 am

When I command my actuator to a certain position it ramps up to max velocity to reach this position.
Can I use the position command with a maximum allowed velocity or can I use velocity_limit_max maybe? How would that look as code?

Best,
Rasmus
User avatar
matt_tesch
HEBI Official
Posts: 26
Joined: Mon Mar 30, 2020 9:14 am
Location: Pittsburgh, USA

Re: Command position with maximum allowed velocity

Post by matt_tesch » Mon Mar 08, 2021 10:54 am

Rasmus,

When commanding a position, this is telling the actuator to try to move to this position instantaneously. While you can use velocity limits to try to address the issue, this isn't really what they are designed for.

Instead, we recommend you plan a smooth trajectory to the destination position for the actuator over a range of time. This allows you to more explicitly control how the actuator reaches the destination position as well as what that destination position is.

For constant velocity motions, you can have a simple while loop that achieves this motion; alternatively, we typically use minimum jerk trajectories to smoothly move the actuator to a destination position.

Here is an example of this in Python:
https://github.com/HebiRobotics/hebi-py ... jectory.py

Also, I would recommend taking a look at the documentation and tutorial video; these go into more depth on this topic and some alternatives:

https://docs.hebi.us/core_concepts.html ... y_overview

HD-Lab_Rasmus
Posts: 5
Joined: Tue Feb 16, 2021 12:31 pm

Re: Command position with maximum allowed velocity

Post by HD-Lab_Rasmus » Mon Mar 08, 2021 12:30 pm

Alright, thanks Matt. I'm gonna take a look at planning a trajectory instead.
Post Reply