xArm-Developer / xarm_ros2

ROS2 developer packages for robotic products from UFACTORY
https://www.ufactory.cc/pages/xarm
BSD 3-Clause "New" or "Revised" License
102 stars 58 forks source link

How to call motion planning service with a smooth pose path array? #3

Closed scottnortman closed 2 years ago

scottnortman commented 2 years ago

I have the simulated arm working with the xarm_planner and moveit. I have written a python node to call the services PlanJoint and PlanPose, but I need the ability to execute a smooth cartesian motion with an array of poses I generate in a different node.

I see the c++ methods

planPoseTargets and planCartesianPath

but it does not seem those methods are exposed via service calls.

Is there a way to pass an array of Poses via a service call?

vimior commented 2 years ago

Hi @scottnortman Several service calls (xarm_exec_plan, xarm_pose_plan, xarm_joint_plan) are provided in xarm_plan_node, refer to xarm_planner/test/test_xarm_planner_client_joint.cpp. Or instantiate xarm_planner directly in the code, so that you can directly use the methods provided by xarm_planner (executePath, planPoseTarget, planJointTarget), refer to xarm_planner/test/test_xarm_planner_api_joint.cpp.

scottnortman commented 2 years ago

I added the service to call the cartesian planner; it works as I need for my application

See my fork here: https://github.com/scottnortman/xarm_ros2

Here is an an example node in python to call: https://github.com/scottnortman/xarm_ros2_client_py_pkg