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

adding path_constraints on planning_interface::MotionPlanRequest doesn't work #3171

Open
ahn1938549 opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ahn1938549
Copy link

Description

i'm using humble 22.04

I'm using moveit2 tutorial

res.error_code get success and trajectory published but position that i didn't expected it's like random it changes every time.
but trajectory satisfied bucket_constraint if i set on 0.1.

Should I missed something?

ROS Distro

Humble

OS and version

Ubuntu 22.04

Source or binary build?

Source

If binary, which release version?

No response

If source, which branch?

No response

Which RMW are you using?

None

Steps to Reproduce

moveit_msgs::msg::Constraints pose_goal = kinematic_constraints::constructGoalConstraints("panda_link8", target_pose);
req.goal_constraints.push_back(pose_goal);

it's working well but after i added below.

moveit_msgs::msg::Constraints pose_goal = kinematic_constraints::constructGoalConstraints("panda_link8", target_pose);
moveit_msgs::msg::OrientationConstraint bucket_constraint;
bucket_constraint.link_name = "panda_link8";
geometry_msgs::msg::PoseStamped info = move_group_->getCurrentPose("panda_link8");
bucket_constraint.header.frame_id = "panda_link8";
bucket_constraint.orientation = target_pose.pose.orientation;
bucket_constraint.absolute_x_axis_tolerance = 3.14;
bucket_constraint.absolute_y_axis_tolerance = 3.14;
bucket_constraint.absolute_z_axis_tolerance = 3.14;
bucket_constraint.weight = 1.0;
req.path_constraints.orientation_constraints.push_back(bucket_constraint);
req.goal_constraints.push_back(pose_goal);



    planning_scene_monitor::LockedPlanningSceneRO lscene(psm_);
    if (!planning_pipeline_->generatePlan(lscene, req, res) || res.error_code_.val != res.error_code_.SUCCESS)
    {
        RCLCPP_ERROR(LOGGER, "Could not compute plan successfully");
        result->succeeded = false;
        goal_handle->abort(result);
        busy_ = false;
        return;

    }

req.path_constraints.orientation_constraints.push_back(bucket_constraint);

this code make path_constraints well but not position that i expected.

Expected behavior

Work as tutorial.

Actual behavior

req.path_constraints.orientation_constraints.push_back(bucket_constraint);

this code make position as a random.

position that i didn't expected it's like random it changes every time.
but trajectory satisfied bucket_constraint if i set on 0.1.

Backtrace or Console output

No response

@ahn1938549 ahn1938549 added the bug Something isn't working label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant