Can achieve some move
On some trajectory , the planner only achieve few purcent of the trajectory:
[ INFO] [1662454965.319077141]: Received request to compute Cartesian path
[ INFO] [1662454965.319391330]: Attempting to follow 1 waypoints for link 'panda_link8' using a step of 0.001000 m and jump threshold 10.000000 (in global reference frame)
[ INFO] [1662454965.376369288]: Computed Cartesian path with 20 points (followed 31.666667% of requested trajectory)
[ INFO] [1662454965.377433531]: Execution request received
[ INFO] [1662454965.884138345]: Controller 'position_joint_trajectory_controller' successfully finished
[ INFO] [1662454965.983672836]: Completed trajectory execution with status SUCCEEDED ...
[ INFO] [1662454965.983748887]: Execution completed: SUCCEEDED
Your environment ROS Distro: Noetic OS Version: Ubuntu 20.04 Here is the code I use to generate trajectory:
def set_robot_position_with_path(self, pose):
print("set_robot_position_with_path {}".format(pose))
pose_goal = geometry_msgs.msg.Pose()
pose_goal.position.x = pose["position"][0]
pose_goal.position.y = pose["position"][1]
pose_goal.position.z = pose["position"][2]
pose_goal.orientation.x = pose["orientation"][0]
pose_goal.orientation.y = pose["orientation"][1]
pose_goal.orientation.z = pose["orientation"][2]
pose_goal.orientation.w = pose["orientation"][3]
self.move_group.set_start_state_to_current_state()
waypoints = []
wpose = self.move_group.get_current_pose().pose
wpose.position.x = pose["position"][0]
wpose.position.y = pose["position"][1]
wpose.position.z = pose["position"][2]
wpose.orientation.x = pose["orientation"][0]
wpose.orientation.y = pose["orientation"][1]
wpose.orientation.z = pose["orientation"][2]
wpose.orientation.w = pose["orientation"][3]
waypoints.append(copy.deepcopy(wpose))
(plan, fraction) = self.move_group.compute_cartesian_path(
waypoints, # waypoints to follow
0.001, # eef_step
10) # jump_threshold
velocity_command = 0.1
plan = self.move_group.retime_trajectory(moveit_commander.RobotCommander().get_current_state(),
plan,
velocity_command)
ret = self.execute_plan(plan)
Edit: After the failed in my program, when I try to replan a trajectory in rviz approximatly at the same point, it works fine. Do rviz use a other path planning?
Asked by arno on 2022-09-06 06:59:14 UTC
Comments
Quick comment: RViz uses joint space planning through OMPL. You call
move_group.compute_cartesian_path(..)
. Those are two completely different things.Asked by gvdhoorn on 2022-09-06 12:02:46 UTC
How can I do the same in my python example?
Asked by arno on 2022-09-06 12:05:41 UTC