Repository navigation
Description
Description
In my moveit config package, there is an auto-generated file 'joint_limits.yaml'. If i change the values (e.g. factor 10 in velocity), there is no change in the trajectory/ movement of the robot arm in RViz - I expect it to be factor 10 slower. It's probably not an error, but I cannot find proper documentation to setup a MoveGroup-Node correctly to use the joint_limits.yaml (and further down the road: Change velocity and acceleration scaling factors with parameters from a launch file).
Your environment
- ROS Distro: Humble
- OS Version: Ubuntu 22.04
- Moveit: Binary
Steps to reproduce
- Using MoveGroup-Node, parameters contain the loaded file 'joint_limits.yaml'
- Later in my cpp-Node, i use the MoveGroupInterface to plan (cartesian) and execute a movement:
Launching MoveGroup-Node
run_move_group_node_2 = Node(
package="moveit_ros_move_group",
executable="move_group",
# name="move_group_test",
output="screen",
arguments = ['--ros-args', '--log-level', 'WARN'],
parameters=[
robot_description,
robot_description_semantic,
kinematics_yaml,
joint_limits_yaml,
ompl_planning_pipeline_config,
trajectory_execution,
moveit_controllers,
planning_scene_monitor_parameters,
],
)
Using MoveGroupInterface:
std::vector<geometry_msgs::msg::Pose> waypoints;
geometry_msgs::msg::PoseStamped target_pose;
target_pose.pose = target;
target_pose.header.frame_id = end_effector_link;
waypoints.push_back(target);
moveit_msgs::msg::RobotTrajectory trajectory;
const double jump_threshold = 0.0;
const double eef_step = 0.01;
double fraction = move_group_interface.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory); // Fraction refers to planned path coverage. Should be over 100% = 1
// Execute the plan
if (fraction >= 1) // fraction = part of planned trajectory (should be 100%)
{
RCLCPP_ERROR(LOGGER, "Execute");
move_group_interface.execute(trajectory);
return true;
The terminal window outputs move_group-4] [WARN] [1684833457.407691711] [moveit_trajectory_processing.time_optimal_trajectory_generation]: Joint acceleration limits are not defined. Using the default 1 rad/s^2. You can define acceleration limits in the URDF or joint_limits.yaml. indicating that joint_limits.yaml is not loaded at all, since there are joint limits defined:
default_velocity_scaling_factor: 1.0
default_acceleration_scaling_factor: 1.0
joint_limits:
melfa_1_joint1:
has_velocity_limits: true
max_velocity: 6.2831853071795862
# max_velocity: 0.62831853071795862
has_acceleration_limits: true
max_acceleration: 6.2831853071795862
melfa_1_joint2:
has_velocity_limits: true
max_velocity: 6.9987703004972612
# max_velocity: 0.69987703004972612
has_acceleration_limits: true
max_acceleration: 6.9987703004972612
...
Expected behaviour
Based on documentation, I expect that 1) the file joint_limits.yaml - file is loaded automatically and overrides (maybe existing) joint limits from the urdf. 2), if changes are made to this file, the trajectory/ movement itself in rviz (and of course the real robot too) should represent these changes.
By default MoveIt sets the joint velocity and acceleration limits of a joint trajectory to the default allowed in the robot’s URDF or joint_limits.yaml. The joint_limits.yaml is generated from the Setup Assistant and is initially an exact copy of the values within the URDF. The user can then modify those values to be less than the original URDF values if special constraints are needed. Specific joint properties can be changed with the keys max_position, min_position, max_velocity, max_acceleration, max_jerk. Joint limits can be turned on or off with the keys has_velocity_limits, has_acceleration_limits, has_jerk_limits.
https://moveit.picknik.ai/humble/doc/examples/time_parameterization/time_parameterization_tutorial.html?highlight=joint_limits
Actual behaviour
Unfortunately, there is no change in the speed whatsoever.
Activity
andrey-pr commentedon May 24, 2023
Here is my code of it:
joint_limits.yaml:henningkayser commentedon May 25, 2023
Thanks for reporting this issue. First-off, I've just tried customizing velocity and acceleration limits on using moveit_resource's Panda robot and they certainly work, speed is changing and no warning for me. However, there are several things that could go wrong when specifying the launch config, which is why we have added the MoveItConfigsBuilder, see the Panda example. From what you've posted I can't identify any obvious issues, unfortunately.
Things to check:
ros2 param list+ros2 param getRobinHeitz commentedon May 26, 2023
Thanks for your answer @henningkayser :)
I don't know whats wrong with my launch file(s).
First, I'm not able to use
"ros2_control_hardware_type": LaunchConfiguration( "ros2_control_hardware_type" )for the mapping; it yields the errorDeclared arguments look like this:
And they are passed to the LaunchDescription:
So, I need to hard-code the xacro parameters :(
Anyways, this is my builder:
I used this config builder in any launch file and pass all parameters with 'to_dict()'.
I still get the error
Some additional words to my setup:
I've 2 robot arms in a single urdf file. One robot uses the/ your hybrid planning architecture and should plan around the other arm that is moving in its way.
Because the HP robot's movement is not fluent, I want to change the velo/ acc parameters.
I'm using one moveit config package that contains both arms; e.g. kinematics.yaml contains the 2 planning groups for both arms.
(just in case this has something to do with it. Since they've different prefixes it should not collide parameter-wise).
henningkayser commentedon May 26, 2023
That's really odd, the joint names should exactly match the ones used in the description including prefix (looks like this already is the case for you). Different groups don't change the joint names, though. Are other limits being picked up, say if you use RViz motion planning panel? Maybe @JafarAbdi could have a look at your launch config.
RobinHeitz commentedon May 26, 2023
Well, the error regarding that no acceleration_limits are set is gone now. Don't really know whats changed. There is a noticeable difference in movement based on joint_limits.yaml's max_velocity and max_acceleration values.
However, default_velocity_scaling_factor and default_acceleration_scaling_factor have no effect at all.
Seems like MoveitConfigBuilder did it's job! Thanks for that!
But still the error with the mapping:
works fine, but as soon as a LaunchConfiguration appears:
Any idea? Should be the same like your panda example...
Thanks!
github-actions commentedon Jul 11, 2023
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.
RobinHeitz commentedon Aug 2, 2023
Well I'm not working on that project anymore; as far as I know its still there.