-
BackgroundI'm investigating the relationship between velocity/acceleration scaling factors and their impact on trajectory planning in the Pilz Industrial Motion Planner, specifically when using the "LIN" motion type. The key functions in question are: planner->setMaxVelocityScalingFactor(vel_scaling);
planner->setMaxAccelerationScalingFactor(acc_scaling); Observed BehaviorI've encountered some unexpected behavior when working with these scaling factors in moveRelative tasks. Here are two test cases that demonstrate the issue: Test Case 1: Scaling Factor 0.1
Test Case 2: Scaling Factor 0.00011
Questions and Observations
Investigation AttemptsI've looked into the implementation files for both:
However, I've been unable to trace the direct connection between setting the scaling factors and their influence on the trajectory planning process. Key Questions
Any insights into how these scaling factors are implemented and their expected behavior would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
MTC just passes the scaling factors to the PlanningRequest: moveit_task_constructor/core/src/solvers/pipeline_planner.cpp Lines 150 to 151 in 8318546 MoveIt's planning pipeline passes those values to the TimeParameterization plugin: virtual bool computeTimeStamps(robot_trajectory::RobotTrajectory& trajectory,
const double max_velocity_scaling_factor = 1.0,
const double max_acceleration_scaling_factor = 1.0) const = 0; However, the Pilz planners do not use a TimeParameterization plugin, but compute the trajectory timing as part of motion generation. Please verify whether the scaling factor is correctly conveyed to the Pilz planner, by inspecting the values here: void TrajectoryGenerator::validateRequest(const planning_interface::MotionPlanRequest& req,
const moveit::core::RobotState& rstate) const
{
checkVelocityScaling(req.max_velocity_scaling_factor);
checkAccelerationScaling(req.max_acceleration_scaling_factor);
If so, the issue is with the Pilz planner, not MTC (I strongly think so). File a bug report for MoveIt then. |
Beta Was this translation helpful? Give feedback.
After investigating further, I can confirm that MTC (Move Task Constructor) is functioning correctly. Using a debugger to trace the scaling factor values, I set a breakpoint on
TrajectoryGenerator::validateRequest
with a relative motion stage set to 0.1:This confirms that the scaling factors are being properly conveyed through the system.
While investigating, I discovered this exact issue has been documented in MoveIt issue #…