small changes, cleanup, added docs/
This commit is contained in:
parent
56636a69fe
commit
6527a94aed
25
config.py
25
config.py
@ -1,6 +1,6 @@
|
||||
import math
|
||||
|
||||
DEBUG = True
|
||||
DEBUG = True #prints information to stdout
|
||||
|
||||
|
||||
# GUI
|
||||
@ -17,10 +17,10 @@ CTR_FPS = 60 #manual control
|
||||
|
||||
# NETWORK
|
||||
#
|
||||
# The IP address can be found in the PolyScope interface (tablet) of the robot.
|
||||
# SETUP Robot -> Setup NETWORK (requires password) -> IP address
|
||||
# The IP address can be found in the PolyScope interface (tablet) of the robot. Select:
|
||||
# SETUP Robot -> Setup NETWORK (password: "ngr12") -> IP address
|
||||
UR5_IP = "129.241.187.119"
|
||||
UR5_HOSTNAME = 'ur-2012208984' #requires dns.
|
||||
UR5_HOSTNAME = 'ur-2012208984' #not used, requires dns.
|
||||
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ BLOCK_DIM = 0.0965 #TUNED
|
||||
# along the base x-axis, quadrant 1.0 corresponds to the base y-axis, etc.
|
||||
# Quardant 0 is recommended.
|
||||
TABLE_QUADRANT = 0 #[0..4)
|
||||
TABLE_ORIGO_OFFSET = (-0.245, -0.003) #offset from origo along base x-axis
|
||||
TABLE_ORIGO_OFFSET = (-0.245, -0.003) #offset from robot base origo along base x-axis
|
||||
TABLE_Z = -0.3337 #this should be fine-tuned on each setup
|
||||
TABLE_ARC = math.pi/2
|
||||
|
||||
@ -97,9 +97,11 @@ T_DIR_CHANGE_COOLDOWN = 0.05
|
||||
|
||||
# Constraints are relative to the cylinder coordinate system.
|
||||
# Because of delay and fluctuations of parameters in the system,
|
||||
# the calculation of projected positions are not correct.
|
||||
# the estimated velocity at each time instant is not correct, consequently the
|
||||
# calculation of projected positions are also not correct.
|
||||
# Therefore, an empirical offset is added in controller.update().
|
||||
# Consider this before changing control speed
|
||||
# Consider this before changing control speed: It may be required to change the
|
||||
# offsets in the code (not tested)
|
||||
R_MIN = 0.49
|
||||
R_MAX = 0.75
|
||||
THETA_MIN= -TABLE_ARC/2
|
||||
@ -132,8 +134,8 @@ Z_MAX = TABLE_Z + 2*BLOCK_DIM
|
||||
# Left trigger:2
|
||||
# Right trigger:5
|
||||
#
|
||||
# Hat switch:0 (All or nothing for direction). returns (+-1, +-1) = (+-x. +-y)
|
||||
# hx, hy = hat
|
||||
# Hat switch:0 (All or nothing for direction). returns (+-1, +-1) = (+-x. +-y) = (hx, hy)
|
||||
|
||||
HATCODE = -1 #set to -1 to avoid polling hat
|
||||
HX = 10
|
||||
HY = 11
|
||||
@ -141,7 +143,6 @@ HAT_MAP = {
|
||||
HX: (0,1,0),
|
||||
HY: (-1,0,0) #inverted
|
||||
}
|
||||
|
||||
#BUTTON_MAP = {
|
||||
# 4: (0,0,-1),
|
||||
# 5: (0,0,1)
|
||||
@ -163,7 +164,7 @@ BUTTON_MAP = { #Buttons only (no hat)
|
||||
# This means that the trapezoidal velocity curve has the same slope at
|
||||
# start and end of a motion. (acceleration=deceleration)
|
||||
#
|
||||
# Constraints in r and z-direction are specefied in levels to enable
|
||||
# Coordinates in r and z-direction are specefied in block-space to enable
|
||||
# easier construction of loops. Note that the r-levels grow inwards, and
|
||||
# the z-levels grow upwards.
|
||||
DEFAULT_LOOP_VEL = 0.1
|
||||
@ -176,7 +177,7 @@ Z_LVL0 = TABLE_Z + BLOCK_DIM/2 #tool in middle of block
|
||||
THETA_EDGE_LEFT = -math.pi/4 + math.pi/74 #empirical. table is not exact
|
||||
THETA_EDGE_RIGHT = math.pi/4 - math.pi/74
|
||||
|
||||
# Offsets when picking (and placing) blocks.
|
||||
# Offsets when picking (and placing) blocks specified in cylinder space.
|
||||
# The place-block move is the reverse of the pick-block move,
|
||||
# such that the start/end offsets for pick-block are the end/start offsets
|
||||
# for place-block
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
(Based on tests.)
|
||||
|
||||
After security stop (red button), shut down and restart robot.
|
||||
After stop during loop, exit and restart loop. (The robot doesnt continue where it stopped)
|
||||
|
||||
When running the application, the robot has to be initialized (all lights green or teach mode)
|
||||
When the application exits normally, the robot is set to freedrive mode (TEACH on tablet)
|
||||
@ -325,7 +325,7 @@ if __name__ == '__main__':
|
||||
("Check z-levels", check_z_levels),
|
||||
("Test unitary moves.", test_unitary_moves),
|
||||
("Test multi-directional moves", test_multi_moves),
|
||||
("Check loop constraints", check_loop_constraints),
|
||||
("Check loop constraints and block positions", check_loop_constraints),
|
||||
("Test URScript's movec", test_movec),
|
||||
("Build four stories high", four_stories),
|
||||
("Build small pyramid", small_pyramid)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user