Ask Your Question
2

How to decrease the speed of my robot?

asked 2021-04-15 03:19:39 -0500

Ranjit Kathiriya gravatar image

updated 2022-04-30 13:24:06 -0500

lucasw gravatar image

Hello there,

I am not able to decrease the speed of my real robot. If I am decreasing the speed from RVIZ by setting Velecoty Scaling and Accel Scaling then it is working fine. If I am giving the robot a trajectory from python code then it very fast does anyone have an idea of how can I be able to solve this issue?

I have tried few things:

  1. By using set_max_velocity_scaling_factor and set_max_acceleration_scaling_factor function as maintained in following post.

    move_group = moveit_commander.MoveGroupCommander(group_name) move_group.set_max_velocity_scaling_factor(0.01) move_group.set_max_acceleration_scaling_factor(0.01)

  2. I have updated default_velocity_scaling_factor and default_acceleration_scaling_factor to 0.01 in joint_limits.yaml file.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2021-04-15 04:44:28 -0500

crnewton gravatar image

updated 2021-05-31 04:21:23 -0500

in case of computeCartesianPath(..) there is no support for scaling velocities/accelerations. You can control the speed by using retime_trajectory(..):

        waypoints = getMyWaypoints()

        (plan, fraction) = group.compute_cartesian_path(
            waypoints,
            0.01,
            0.0
        )
        plan = group.retime_trajectory(moveit_commander.RobotCommander().get_current_state(), 
                                       plan, 
                                       velocity_scaling_factor)
        group.execute(plan, wait=True)
edit flag offensive delete link more

Comments

Thanks! it works

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-04-15 05:04:04 -0500 )edit
1

moveit_robot_state = moveit_commander.RobotCommander().get_current_state()

lorepieri gravatar image lorepieri  ( 2021-05-27 06:46:13 -0500 )edit
1

Also speed is actually the speed scaling factor.

lorepieri gravatar image lorepieri  ( 2021-05-27 06:48:44 -0500 )edit

Updated my answer to be more generic. as @lorepieri commented.

crnewton gravatar image crnewton  ( 2021-05-31 04:22:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-04-15 03:19:39 -0500

Seen: 305 times

Last updated: May 31 '21