-1

When I'm using the Baxter robot for path planning, I wrote a very simple demo according to the Moveit doc and the Baxter robot tutorial hoping to use the move it for trajectory planning, I got a problem:

[baxter - http://localhost:11311] bealliant@bealliant-virtual-machine:~/BaxterRobot$ python3 move_demo.py 
============ Starting tutorial setup
[ INFO] [1691986674.589826757, 325.841000000]: Loading robot model 'baxter'...
[ WARN] [1691986674.597861770, 325.845000000]: Skipping virtual joint 'world_joint' because its child frame 'base' does not match the URDF frame 'world'
[ INFO] [1691986674.597922650, 325.845000000]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ WARN] [1691986674.657185429, 325.864000000]: Link display has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.657404355, 325.864000000]: Link left_hand_accelerometer has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.657451610, 325.864000000]: Link left_hand_camera has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.657461380, 325.864000000]: Link left_hand_range has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.658701966, 325.864000000]: Link right_hand_accelerometer has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.660072446, 325.864000000]: Link right_hand_camera has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.660222824, 325.864000000]: Link right_hand_range has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[ WARN] [1691986674.856649765, 325.923000000]: Kinematics solver doesn't support #attempts anymore, but only a timeout.
Please remove the parameter '/robot_description_kinematics/left_arm/kinematics_solver_attempts' from your configuration.
[ INFO] [1691986676.262107056, 326.605000000]: Ready to take commands for planning group right_arm.
move_demo.py:16: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  display_trajectory_publisher = rospy.Publisher('/move_group/display_planned_path', moveit_msgs.msg.DisplayTrajectory)
[ WARN] [1691986676.388703544, 326.624000000]: Fail: ABORTED: START_STATE_IN_COLLISION
============ Waiting while RVIZ displays plan1...
[ WARN] [1691986678.212003037, 327.646000000]: Joint values for monitored state are requested but the full state is not known
[ INFO] [1691986688.730178660, 332.655000000]: ABORTED: START_STATE_IN_COLLISIO

and the following is my code move_demo.py, very simple,

#!/usr/bin python
import sys
import copy
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
import math

print("============ Starting tutorial setup")
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('move_group_python_interface_tutorial', anonymous=True)
robot = moveit_commander.RobotCommander()
scene = moveit_commander.PlanningSceneInterface()
group = moveit_commander.MoveGroupCommander("right_arm")
display_trajectory_publisher = rospy.Publisher('/move_group/display_planned_path', moveit_msgs.msg.DisplayTrajectory)

# print("============ Waiting for RVIZ...")
# rospy.sleep(5)
# print("============ Starting tutorial")
# print("============ Reference frame: %s" % group.get_planning_frame())
# print("============ Printing robot state")
# # print(robot.get_current_state())
# print("============")
# print("============ Generating plan 1")
pose_target = geometry_msgs.msg.Pose()
pose_target.orientation.w = 0
pose_target.position.x = 0
pose_target.position.y = 0
pose_target.position.z = 0
group.set_pose_target(pose_target)
plan_success, plan1,planning_time,error_code = group.plan()
print("============ Waiting while RVIZ displays plan1...")
# rospy.sleep(5)
# print("============ Visualizing plan1")
display_trajectory = moveit_msgs.msg.DisplayTrajectory()
display_trajectory.trajectory_start = robot.get_current_state()
display_trajectory.trajectory.append(plan1)
display_trajectory_publisher.publish(display_trajectory)
# print("============ Waiting while plan1 is visualized (again)...")
rospy.sleep(5)
# Uncomment below line when working with a realrobot
group.go(wait=True)

#
group.stop()

so I contact the technical support of the manufacturer, and he said that I can try to reboot the Gazebo or try to run the following command so that the robot and return to the neutral state:

rosrun baxter_tools tuck_arms.py -u

still meet the same problem.

Well I tried rviz, it seems that my rviz moveit has also encountered some trouble. enter image description here As you can see, I randomly dragged the left arm of the robot, and click the plan button, but it shows a Failed below. I don't know why.

0 Answers0