Search the Community
Showing results for tags 'python'.
Found 4 results
I am trying to create a server dashboard using Python that is linked to a number of devices (eg. sensors, conveyor, cameras and other robot brands) using an ethernet port switch, and send/receive data to Sawyer using this Dashboard and have a few questions. This dashboard is in the server PC with the following wired connection: Server PC > Port Switches > Sawyer (and other devices) I have referred to this link below but I would like to get more flexibility to control it (trajectory control etc) so I was looking into the SDK tutorials. https://mfg.rethinkrobotics.com/intera/Using_TCP/IP I have tested the examples for the Sawyer in Oracle VM and made a sample program to run it. It resembles the program seen here: https://sdk.rethinkrobotics.com/intera/Hello_Robot 1. How do I for example, retrieve joint angle (and maybe camera image) and show it in my dashboard? Have anyone done something like this before? Generally, I will have these shown in the dashboard: robot status (eg idle/ready/stopped/error) program name camera image joint angles 2. I plan to have my (currently non-existent) dashboard outside of the VM but in the same PC. How do I establish the communication to the robot from outside the VM? I have tried using the same leading IP address as my WiFi (NAT) but I cannot get a connection without disabling my NAT or PCIE. Individual connections was tested to be working fine so I think my error is about using WiFi and PCIE together. Connections: 1. PC <-> VM (NAT) 2. VM <-> Sawyer (PCIE) by TCP/IP Network: NAT: 192.168.1.3 subnet: 255.255.255.0 PCIE: 192.168.1.105 subnet: 255.255.255.0 Sawyer: 192.168.1.100 subnet: 255.255.255.0 Additional Info: Ubuntu 16.04 + ROS Kinetic Intera 5.3 3. I assume I needed to have a program for server (PC) and client (VM) so I made a sample socket client server program. I did try using packet sender to send data through TCP/IP in Intera and back from Sawyer. Can I do the same with sockets? This is my first time doing this so I appreciate any guidance you guys can provide. Thanks. client_echo.py server_echo.py
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