Search the Community
Showing results for tags 'python'.
Found 3 results
Hi everyone! I'm trying to do motion planning pipeline with moveIt in my Sawyer but there are only tutorials in c++ by MoveIt!, when i run this tutorial i have a error with systaxis (but i'm sure that it's okay). do anyone some code or tutorial about it in python? or do anyone know if i need to do anything to copile code in c++? can anyone help me? thanks a lot!
Hi all, I am facing an issue trying to use the MoveIt! package to control the Sawyer. I followed all tutorials on how to set up ROS Kinetic, the Sawyer SDK packages and the MoveIt! package. I am know trying to work my way through the MoveIt tutorial. I am able to successfully load the robot inside Rviz, move the end effector in the interface and plan a trajectory. However when I try to execute it, Rviz shows a "failed" message and in the terminal output I can read : Failed to validate trajectory: couldn't receive full current joint state within 1s I also tried to use MoveIt! through the Python interface but when I execute the following : import sys import copy import rospy import moveit_commander import moveit_msgs.msg import geometry_msgs.msg from std_msgs.msg import String 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, queue_size=20) print "============ Reference frame: %s" % group.get_planning_frame() print "============ End effector: %s" % group.get_end_effector_link() print "============ Robot Groups:" print robot.get_group_names() print "============ Printing robot state" print robot.get_current_state() print "============" ... I get something like : ============ Reference frame: /base ============ End effector: right_hand ============ Robot Groups: ['right_arm'] ============ Printing robot state [ WARN] [1526377733.002742750]: Joint values for monitored state are requested but the full state is not known joint_state: header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: "/base" name: [right_j0, head_pan, right_j1, right_j2, right_j3, right_j4, right_j5, right_j6] position: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] velocity:  effort:  multi_dof_joint_state: header: seq: 0 stamp: secs: 0 nsecs: 0 frame_id: "/base" joint_names:  transforms:  twist:  wrench:  attached_collision_objects:  is_diff: False ============ This is basically the same problem as in this ROS Q&A question : MoveIt: troubles with joint values Unfortunately this question did not get any useful answer. The weird thing is that the joint state is actually published, when I echo the /robot/joint_states topic I can see the values being updated : header: seq: 600867 stamp: secs: 1526364559 nsecs: 890697828 frame_id: '' name: [head_pan, right_j0, right_j1, right_j2, right_j3, right_j4, right_j5, right_j6, torso_t0] position: [-4.0742021484375, -0.2243544921875, -1.1203125, 0.4582724609375, 2.05134375, -0.29490625, 0.69954296875, -4.114162109375, 0.0] velocity: [-0.001, -0.001, -0.001, -0.001, -0.001, -0.001, -0.001, -0.001, 0.0] effort: [-0.012, 0.052, -20.068, -1.06, -5.996, 0.572, 0.104, -0.284, 0.0] And when I query informations about the /robot/joint_states topic, I can see that both the /realtime_loop and /move_group nodes are publishing/subscribing to it : Type: sensor_msgs/JointState Publishers: * /realtime_loop (http://192.168.212.60:42358/) Subscribers: * /robot_state_publisher (http://192.168.212.60:38760/) * /robot/environment_server (http://192.168.212.60:59368/) * /calibrate_arm (http://192.168.212.60:57953/) * /PositionKinematicsNode_right (http://192.168.212.60:56399/) * /JointMotionPathNode_right (http://192.168.212.60:58612/) * /motion_controller (http://192.168.212.60:37187/) * /sdk_position_w_id_joint_trajectory_action_server_right (http://192.168.212.160:37229/) * /move_group (http://192.168.212.160:43623/) Any idea of what is going on or how I can further investigate the error ? Thanks for your help.
Hello everyone, my goal is to be able to program Sawyer with Python. It would be ideal if I could run a simulation of my program first to see if everything is correct. Therefor I familiarized myself with some of the provided example programs and did the MoveIt-Tutorial and also looked a bit further into RVIZ. My problem now is, I checked out the RVIZ tutorial here but the commands have not much to do with the ones used in the examples. So my questions are: Is it better to orient myself on the example programs than on the general ros stuff? And how can I test my program, like sending it into RVIZ? I already wrote a small one for initialisation, copied it to the examples and tried running it, but I got told it wasn't an executable?! Best regards