mirror of
https://github.com/nasa/trick.git
synced 2024-12-21 06:03:10 +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>
33 lines
873 B
Plaintext
33 lines
873 B
Plaintext
/************************TRICK HEADER*************************
|
|
PURPOSE:
|
|
( Simulate kinematic, planar 2 degree-of-freedom manipulator )
|
|
LIBRARY DEPENDENCIES:
|
|
(
|
|
(manipulator/manipulator.cc)
|
|
)
|
|
*************************************************************/
|
|
|
|
#include "sim_objects/default_trick_sys.sm"
|
|
##include "include/trick/exec_proto.h"
|
|
##include "manipulator/manipulator.hh"
|
|
|
|
class ManipulatorSimObject : public Trick::SimObject
|
|
{
|
|
|
|
public:
|
|
PlanarManip robot;
|
|
|
|
ManipulatorSimObject(int ndof): robot(ndof)
|
|
{
|
|
(0.050, "scheduled") robot.calcKinematics();
|
|
(0.050, "scheduled") robot.control();
|
|
("derivative") robot.stateDeriv();
|
|
("integration") trick_ret = robot.updateState();
|
|
}
|
|
|
|
};
|
|
|
|
ManipulatorSimObject Manip2D(2);
|
|
|
|
IntegLoop armIntegLoop(0.050) Manip2D;
|