mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
7bc6ab74a8
* added SIM_singlerigidbody * Removed a few sections in the README file * Removed the sims directory * Added shutdown job and made minor changes to body.cpp --------- Co-authored-by: Wallace <bnwalla1@scooby.trick.gov>
55 lines
2.2 KiB
Python
55 lines
2.2 KiB
Python
global DR_GROUP_ID
|
|
global drg
|
|
try:
|
|
if DR_GROUP_ID >= 0:
|
|
DR_GROUP_ID += 1
|
|
except NameError:
|
|
DR_GROUP_ID = 0
|
|
drg = []
|
|
|
|
drg.append(trick.DRBinary("StateData"))
|
|
drg[DR_GROUP_ID].set_freq(trick.DR_Always)
|
|
drg[DR_GROUP_ID].set_cycle(0.10)
|
|
drg[DR_GROUP_ID].set_single_prec_only(False)
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.force[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.force[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.force[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.angle_force[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.angle_force[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.angle_force[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[0][0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[0][1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[0][2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[1][0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[1][1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[1][2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[2][0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[2][1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.rotate[2][2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.pos[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.pos[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.pos[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.angle[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.angle[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.angle[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.vel[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.vel[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.vel[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.acc[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.acc[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.acc[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.omega[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.omega[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.omega[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.omegaDot[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.omegaDot[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.omegaDot[2]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.FORCE_INIT[0]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.FORCE_INIT[1]")
|
|
drg[DR_GROUP_ID].add_variable("dyn.body.FORCE_INIT[2]")
|
|
|
|
|
|
|
|
trick.add_data_record_group(drg[DR_GROUP_ID], trick.DR_Buffer)
|
|
drg[DR_GROUP_ID].enable()
|