mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
fd8252e2c5
* First commit of SIM_robot. * Updates to kinematic arm with controller * Working well enough, still needs some user interface besides trick-TV * Add end-effector path trace to graphics client. * Singularity control bug, remove printouts, udpate makefile * Improve SIM_robot variable server client. * Tidy up RobotDisplay.java * Tidying up * Removing warnings * Working on documentation * Updating documentation * Updating docs * Adding figures for documentation * Removing some stuff in the README carried over from the template * Tidying up * Position vector finally done * Updating based on feedback * Forward position kinematics completed with notation changes * First pass documentation done? * remove printout * Fix typos in text and filenames * Update README.md * Update README.md * made it smaller --------- Co-authored-by: John M. Penn <john.m.penn@nasa.gov>
34 lines
1.3 KiB
Python
34 lines
1.3 KiB
Python
exec(open("./Modified_data/realtime.py").read())
|
|
|
|
# Variable Server Data should be copied at top of frame.
|
|
trick.var_set_copy_mode(2)
|
|
|
|
Manip2D.robot.kinemat.joint_q[0] = trick.attach_units("degrees",45.0)
|
|
Manip2D.robot.kinemat.joint_q[1] = trick.attach_units("degrees",45.0)
|
|
|
|
Manip2D.robot.kinemat.joint_w[0] = 0.0
|
|
Manip2D.robot.kinemat.joint_w[1] = 0.0
|
|
|
|
Manip2D.robot.controller.Kp = 2.0
|
|
Manip2D.robot.controller.Kd = 0.3
|
|
Manip2D.robot.kinemat.checkSingularities = False
|
|
|
|
armIntegLoop.getIntegrator(trick.Euler, Manip2D.robot.ndof)
|
|
|
|
#==========================================
|
|
# Start the Graphics Client
|
|
#==========================================
|
|
varServerPort = trick.var_server_get_port();
|
|
RobotDisplay_path = "models/graphics/build/RobotDisplay.jar"
|
|
|
|
if (os.path.isfile(RobotDisplay_path)) :
|
|
RobotDisplay_cmd = "java -jar " \
|
|
+ RobotDisplay_path \
|
|
+ " " + str(varServerPort) + " &" ;
|
|
print(RobotDisplay_cmd)
|
|
os.system( RobotDisplay_cmd);
|
|
else :
|
|
print('==================================================================================')
|
|
print('RobotDisplay needs to be built. Please \"cd\" into ../models/graphics and type \"make\".')
|
|
print('==================================================================================')
|