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

Question about cartesian value in ex_pose_goal.py #79

Open
Averykla opened this issue Nov 22, 2024 · 4 comments
Open

Question about cartesian value in ex_pose_goal.py #79

Averykla opened this issue Nov 22, 2024 · 4 comments

Comments

@Averykla
Copy link

Hi author, I need to set a pre-grasp point during the robot grasping process, and then let the robot go down vertically with the posture of the pre-grasp point after the robot reaches the pre-grasp point to grasp the object. So I set the value of cartesian in your program to true during the process of the robot moving from the pre-grasp point to the grasping point. But after my test, I found that as long as I set the value of cartesian to true, my robot will move very fast. Is there any value in the program that can constrain the Cartesian path speed?

I tried cartesian_max_step, but the effect was not obvious. In addition, I would like to ask you a question. When my robot reaches the pre-grasp point, if I continue to use the original RRT planning algorithm, the robot will execute a very complex trajectory, sometimes going around in a circle and then going down to grasp the object. What path planning should I choose from the pre-grasp point to the grasping point?

@Averykla
Copy link
Author

Averykla commented Nov 22, 2024

I read this <Added setting of cartesian speed and acceleration #53>.
I'm so Sorry, I don't have a deep understanding of MoveIt, so I still don't understand how to set the speed and acceleration values ​​of the Cartesian path.

Here is my part code of moveit.
class GetCartesianPath_Request(metaclass=Metaclass_GetCartesianPath_Request): __slots__ = [ '_header', '_start_state', '_group_name', '_link_name', '_waypoints', '_max_step', '_jump_threshold', '_prismatic_jump_threshold', '_revolute_jump_threshold', '_avoid_collisions', '_path_constraints', ]
I noticed that I don't have 'max_velocity_scaling_factor' and 'max_acceleration_scaling_factor'

OMG,I'm sorry I found my ros version is humble.So is there any way to modify the speed of a Cartesian path?

@AndrejOrsula
Copy link
Owner

Hello @Averykla,

You could try manually setting the max_cartesian_speed parameter when sending the action goal (not request). For that, you need to enable action-based execution via MoveIt2(use_move_group_action=True). However, I am not certain it works (PRs are welcome).

move_action_goal.request.max_cartesian_speed = 0.0

As for the ROS distribution (I see you are using Humble), pymoveit2 should automatically handle the naming changes introduced in Iron: moveit/moveit_msgs#130

pymoveit2/pymoveit2/moveit2.py

Lines 2217 to 2220 in 60cc171

if hasattr(move_action_goal.request, "cartesian_speed_limited_link"):
move_action_goal.request.cartesian_speed_limited_link = end_effector
else:
move_action_goal.request.cartesian_speed_end_effector_link = end_effector

Good luck!

@Averykla
Copy link
Author

Averykla commented Nov 26, 2024

Hi @AndrejOrsula , I found that modifying move_action_goal.request.max_cartesian_speed = 0.0 didn't work either. I think it's probably because class GetCartesianPath_Request in ros2 humble doesn't have speed and acceleration attributes.
So, I think this may not be an easy problem.

@AndrejOrsula
Copy link
Owner

I checked, and you are correct. I took a quick look, but unfortunately, I didn't figure out the origin of the issue (internal/external). If you find it, please let us know. 🙂

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