Skip to content
Snippets Groups Projects
Commit 7c12b561 authored by Lab Computer's avatar Lab Computer
Browse files

update launch files to connect to URs individually

parent 541316bb
Branches
No related merge requests found
kinematics:
shoulder:
x: 0
y: 0
z: 0.1279633773215406
roll: -0
pitch: 0
yaw: -6.293537395064304e-05
upper_arm:
x: -4.032100684500639e-05
y: 0
z: 0
roll: 1.570795479939097
pitch: 0
yaw: -3.025597271493336e-05
forearm:
x: -0.6123679136750267
y: 0
z: 0
roll: 3.133680837349133
pitch: 3.140570891343476
yaw: -3.141545241341912
wrist_1:
x: -0.5711819043583151
y: 0.001160468789703822
z: 0.163325753716815
roll: 3.134487532472358
pitch: -3.140632609807427
yaw: 3.14149823222417
wrist_2:
x: 1.069725805287135e-05
y: -0.1156946597359832
z: 7.365176914449007e-05
roll: 1.570159722137749
pitch: 0
yaw: 6.83444208849733e-06
wrist_3:
x: -1.873433213643691e-05
y: 0.09226004407390781
z: -3.595155516812034e-05
roll: 1.570406650486921
pitch: 3.141592653589793
yaw: 3.141570613227544
hash: calib_181927381948858317
\ No newline at end of file
kinematics:
shoulder:
x: 0
y: 0
z: 0.1277377615581236
roll: -0
pitch: 0
yaw: -0.0001009061054409726
upper_arm:
x: 8.087550952193899e-05
y: 0
z: 0
roll: 1.570923960863897
pitch: 0
yaw: 5.097156812238782e-06
forearm:
x: -0.6122900709914697
y: 0
z: 0
roll: 3.133673321896737
pitch: 3.140228340009954
yaw: -3.141495569799454
wrist_1:
x: -0.5710740090380132
y: 0.001188908849082962
z: 0.1636567052448592
roll: 3.13432813037324
pitch: -3.140746095741456
yaw: 3.141554955372285
wrist_2:
x: 4.209860447140924e-05
y: -0.1156555147361468
z: 7.520489775047678e-05
roll: 1.570146077757291
pitch: 0
yaw: -3.409200883733332e-05
wrist_3:
x: -7.468428467779211e-05
y: 0.09223433185124101
z: 6.88733441282997e-05
roll: 1.571543047998865
pitch: 3.141592653589793
yaw: 3.141566651625736
hash: calib_16713004888636078341
\ No newline at end of file
Subproject commit 793ab810f90aa978a3a618bfcb2670db8b691c22
Subproject commit 63170fb6b5d7a8db04ef098bdde25e7545735365
kinematics:
shoulder:
x: 0
y: 0
z: 0.1279633773215406
roll: -0
pitch: 0
yaw: -6.293537395064304e-05
upper_arm:
x: -4.032100684500639e-05
y: 0
z: 0
roll: 1.570795479939097
pitch: 0
yaw: -3.025597271493336e-05
forearm:
x: -0.6123679136750267
y: 0
z: 0
roll: 3.133680837349133
pitch: 3.140570891343476
yaw: -3.141545241341912
wrist_1:
x: -0.5711819043583151
y: 0.001160468789703822
z: 0.163325753716815
roll: 3.134487532472358
pitch: -3.140632609807427
yaw: 3.14149823222417
wrist_2:
x: 1.069725805287135e-05
y: -0.1156946597359832
z: 7.365176914449007e-05
roll: 1.570159722137749
pitch: 0
yaw: 6.83444208849733e-06
wrist_3:
x: -1.873433213643691e-05
y: 0.09226004407390781
z: -3.595155516812034e-05
roll: 1.570406650486921
pitch: 3.141592653589793
yaw: 3.141570613227544
hash: calib_181927381948858317
\ No newline at end of file
kinematics:
shoulder:
x: 0
y: 0
z: 0.1277377615581236
roll: -0
pitch: 0
yaw: -0.0001009061054409726
upper_arm:
x: 8.087550952193899e-05
y: 0
z: 0
roll: 1.570923960863897
pitch: 0
yaw: 5.097156812238782e-06
forearm:
x: -0.6122900709914697
y: 0
z: 0
roll: 3.133673321896737
pitch: 3.140228340009954
yaw: -3.141495569799454
wrist_1:
x: -0.5710740090380132
y: 0.001188908849082962
z: 0.1636567052448592
roll: 3.13432813037324
pitch: -3.140746095741456
yaw: 3.141554955372285
wrist_2:
x: 4.209860447140924e-05
y: -0.1156555147361468
z: 7.520489775047678e-05
roll: 1.570146077757291
pitch: 0
yaw: -3.409200883733332e-05
wrist_3:
x: -7.468428467779211e-05
y: 0.09223433185124101
z: 6.88733441282997e-05
roll: 1.571543047998865
pitch: 3.141592653589793
yaw: 3.141566651625736
hash: calib_16713004888636078341
\ No newline at end of file
Subproject commit 201eabc5d45bd608a4787a9969cf2c1caa3ac490
Subproject commit 483201546193edd139a6701b6ecbd529693c65a7
<?xml version="1.0"?>
<launch>
<arg name="kinematics_config" default="$(find twins_utils)/calibrations/r1_cal.yaml" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description."/>
<arg name="kinematics_config" default="$(find twins_utils)/calibrations/ur10_big_extruder.yaml" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description."/>
<arg name="robot_ip" default="192.168.1.101"/>
<arg name="extrude" default="True"/>
<arg name="extrude" default="False"/>
<!-- ROBOT DRIVER -->
<include file="$(find ur_robot_driver)/launch/ur5e_bringup.launch">
<include file="$(find ur_robot_driver)/launch/ur10_bringup.launch">
<arg name="robot_ip" value="$(arg robot_ip)"/>
<arg name="kinematics_config" value="$(arg kinematics_config)"/>
<arg name="reverse_port" value="50003"/>
......@@ -13,7 +13,7 @@
</include>
<!-- MOVEIT WRAPPER -->
<include file="$(find ur5_e_moveit_config)/launch/ur5_e_moveit_planning_execution.launch"/>
<include file="$(find ur10_moveit_config)/launch/ur10_moveit_planning_execution.launch"/>
<!-- EXTRUDER NODE-->
<node if="$(arg extrude)"
......
<?xml version="1.0"?>
<launch>
<arg name="kinematics_config" default="$(find twins_utils)/calibrations/r2_cal.yaml" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description."/>
<arg name="robot_ip" default="192.168.1.103"/>
<arg name="extrude" default="True"/>
<arg name="kinematics_config" default="$(find twins_utils)/calibrations/ur10_small_extruder.yaml" doc="Kinematics config file used for calibration correction. This will be used to verify the robot's calibration is matching the robot_description."/>
<arg name="robot_ip" default="192.168.1.100"/>
<arg name="extrude" default="False"/>
<!-- ROBOT DRIVER -->
<include file="$(find ur_robot_driver)/launch/ur5e_bringup.launch">
<include file="$(find ur_robot_driver)/launch/ur10_bringup.launch">
<arg name="robot_ip" value="$(arg robot_ip)"/>
<arg name="kinematics_config" value="$(arg kinematics_config)"/>
<arg name="reverse_port" value="50001"/>
<arg name="script_sender_port" value="50002"/>
</include>
<!-- MOVEIT WRAPPER -->
......
......@@ -29,8 +29,8 @@ import moveit_msgs
from moveit_msgs.msg._RobotTrajectory import RobotTrajectory
## Our libraries
from extrudex.msg._ExtruderControl import ExtruderControl
from extrudex.srv._Hotend import Hotend
#from extrudex.msg._ExtruderControl import ExtruderControl
#from extrudex.srv._Hotend import Hotend
from utils import load_plan, JTraj2ROS
class Controller(object):
......@@ -101,15 +101,15 @@ class Controller(object):
self._update_motion_status)
# extruder related
self.extrusion_pub = rospy.Publisher(
'extrusion_cmd',
ExtruderControl,
queue_size=2)
self.extruderReady_sub = rospy.Subscriber(
'ready',
Bool,
self._extruderReady_cb,
queue_size=1)
#self.extrusion_pub = rospy.Publisher(
# 'extrusion_cmd',
# ExtruderControl,
# queue_size=2)
#self.extruderReady_sub = rospy.Subscriber(
# 'ready',
# Bool,
# self._extruderReady_cb,
# queue_size=1)
else:
# MoveIt related
self.robot = moveit_commander.RobotCommander(
......
......@@ -15,6 +15,7 @@ from scipy.spatial.transform import Rotation
# Numpy (1.16.6)
import numpy as np
from math import pi
# ROS Libraries
import rospy
......@@ -37,14 +38,14 @@ def getTransformMat(quat, pos):
return np.linalg.inv(T)
# also used for fast-calibration-ik
_vert_or = [np.array([[-6.74517010e-04, 8.33315658e-04, -9.99999404e-01, -2.90597873e-05],
[ 8.33732192e-04, -9.99999285e-01, -8.33877944e-04, -4.81068309e-05],
[-9.99999404e-01, -8.34294187e-04, 6.73821778e-04, 2.74792069e-06],
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]]),
np.array([[-6.74517010e-04, -8.33315658e-04, 9.99999404e-01, -2.90597873e-05], # 2nd arm
[ 8.33732192e-04, 9.99999285e-01, 8.33877944e-04, -4.81068309e-05],
[-9.99999404e-01, 8.34294187e-04, -6.73821778e-04, 2.74792069e-06],
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]])]
#_vert_or = [np.array([[-6.74517010e-04, 8.33315658e-04, -9.99999404e-01, -2.90597873e-05],
# [ 8.33732192e-04, -9.99999285e-01, -8.33877944e-04, -4.81068309e-05],
# [-9.99999404e-01, -8.34294187e-04, 6.73821778e-04, 2.74792069e-06],
# [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]]),
# np.array([[-6.74517010e-04, -8.33315658e-04, 9.99999404e-01, -2.90597873e-05], # 2nd arm
# [ 8.33732192e-04, 9.99999285e-01, 8.33877944e-04, -4.81068309e-05],
# [-9.99999404e-01, 8.34294187e-04, -6.73821778e-04, 2.74792069e-06],
# [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]])]
class KeyboardController(Controller):
......@@ -55,7 +56,7 @@ class KeyboardController(Controller):
"""
def __init__(self,
homeConf_deg=np.array([0,-90,45,-45,-90,-45]),
homeConf= [pi/2, -3*pi/4, pi/2, pi/4, pi/4, pi],
waitForExtruder=True,
timeScale=1.0,
disableExtruder=False,
......@@ -71,9 +72,7 @@ class KeyboardController(Controller):
disable_extruder=disableExtruder,
robot=robot)
# 1x6
homeConf_rad = np.deg2rad(homeConf_deg)
self.homeConf_rad = homeConf_rad.tolist()
self.homeConf_rad = homeConf
def fk(self,conf):
......
import numpy as np
import pickle
from . import JTrajectory
import gcode2contour as gc
#import gcode2contour as gc
def _emptyTraj(joints, arm):
......@@ -82,7 +82,7 @@ def load_plan(model, contours=False):
if contours:
# Read gcode file
contours = gc.decode_gcode("plans/" + model + ".gcode", max_wp_dist=20)
#contours = gc.decode_gcode("plans/" + model + ".gcode", max_wp_dist=20)
return plan, contours
else:
return plan
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment