-
Notifications
You must be signed in to change notification settings - Fork 231
Continuation of "Adding kinematics cost function tutorial #462" #669
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
Conversation
doc/examples/kinematics_cost_function/src/kinematics_cost_function_tutorial.cpp
Show resolved
Hide resolved
doc/examples/kinematics_cost_function/launch/kinematics_cost_function_tutorial.launch.py
Show resolved
Hide resolved
…unction_tutorial.launch.py Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following our latest PR to this repo, since this work is up to date with ROS 2 should it go in the how to guides vs. the examples?
doc/examples/kinematics_cost_function/src/kinematics_cost_function_tutorial.cpp
Outdated
Show resolved
Hide resolved
const auto frac = moveit::core::CartesianInterpolator::computeCartesianPath( | ||
start_state.get(), joint_model_group, traj, joint_model_group->getLinkModel("panda_link8"), target, true, | ||
max_eef_step, jump_thresh, callback_fn, opts, cost_fn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth saying if you don't want to use the cost function (for comparison), how do you leave it out? Would you just omit that last argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, if you leave it out it will just use an empty std::function object, alternatively, you can pass it an empty function object.
static Distance computeCartesianPath(
RobotState* start_state, const JointModelGroup* group, std::vector<std::shared_ptr<RobotState>>& traj,
const LinkModel* link, const Eigen::Vector3d& translation, bool global_reference_frame,
const MaxEEFStep& max_step, const JumpThreshold& jump_threshold,
const GroupStateValidityCallbackFn& validCallback = GroupStateValidityCallbackFn(),
const kinematics::KinematicsQueryOptions& options = kinematics::KinematicsQueryOptions(),
const kinematics::KinematicsBase::IKCostFn& cost_function = kinematics::KinematicsBase::IKCostFn());
Since the tutorial is about using the cost function API and we assume the users to have some C++ skills I would not explain this.
…tion_tutorial.cpp Co-authored-by: Sebastian Castro <4603398+sea-bass@users.noreply.github.com>
std::vector<moveit::core::RobotStatePtr> traj; | ||
moveit::core::MaxEEFStep max_eef_step(0.01, 0.1); | ||
// Here, we're effectively disabling the jump threshold for joints. This is not recommended on real hardware. | ||
moveit::core::JumpThreshold jump_thresh(0.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request is in conflict. Could you fix it @sjahr? |
I think this will serve as a good reference point for doing the same with |
Description
Continues #462
Original description
Checklist