Skip to content

Commit f3659da

Browse files
committed
Pick with custom max_velocity_scaling_factor during approach+lift
1 parent 24f2248 commit f3659da

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

core/python/bindings/src/stages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <moveit/task_constructor/stages.h>
3838
#include <moveit/task_constructor/stages/pick.h>
3939
#include <moveit/task_constructor/stages/simple_grasp.h>
40+
#include <moveit/task_constructor/solvers/cartesian_path.h>
4041
#include <moveit/planning_scene/planning_scene.h>
4142
#include <moveit_msgs/PlanningScene.h>
4243
#include <pybind11/stl.h>
@@ -434,6 +435,7 @@ void export_stages(pybind11::module& m) {
434435
.property<std::string>("eef_parent_group", "str: Joint model group of the eef's parent")
435436
.def(py::init<Stage::pointer&&, const std::string&>(), "grasp_generator"_a,
436437
"name"_a = std::string("pick"))
438+
.def_property_readonly("cartesian_solver", &Pick::cartesianSolver)
437439
.def("setApproachMotion", &Pick::setApproachMotion, R"(
438440
The approaching motion towards the grasping state is represented
439441
by a twist message.

core/python/test/test_mtc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ def test_Pick(self):
228228
self._check(stage, "eef_frame", "eef_frame")
229229
self._check(stage, "eef_group", "eef_group")
230230
self._check(stage, "eef_parent_group", "eef_parent_group")
231+
self._check(stage.cartesian_solver, "max_velocity_scaling_factor", 0.1)
231232

232233
def test_Place(self):
233234
generator_stage = stages.GeneratePose("generator")

demo/scripts/pickplace.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@
9898
approach.twist.linear.z = -1.0
9999
pick.setApproachMotion(approach, 0.03, 0.1)
100100

101+
pick.cartesian_solver.max_velocity_scaling_factor = 0.1
102+
101103
# Twist to lift the object
102104
lift = TwistStamped()
103105
lift.header.frame_id = "panda_hand"

0 commit comments

Comments
 (0)