Skip to content

Instantly share code, notes, and snippets.

@atuleu
Last active June 15, 2020 19:49
Show Gist options
  • Save atuleu/76a5501540c14042f232d5677a7494a0 to your computer and use it in GitHub Desktop.
Save atuleu/76a5501540c14042f232d5677a7494a0 to your computer and use it in GitHub Desktop.
#FortMyrmidon Set Ant orientation manually
e <- fmExperimentOpen("file.myrmidon")
ts <- fmQueryComputeTagStatistics()
for ( i in seq(1,length(ts))) {
# optionnaly maybe skip the tag with some criterion
if ( ts[i]$Count < 42 ) {
next;
}
a <- e$createAnt();
e$addIdentification(a$antID(),ts[i]$TagID,fmTimeInf(),fmTimeInf())
}
# now you would certainly use fmQueryComputeAntTrajectory and some heuristics to compute the pose you want
ants <- e$ants()
for ( i in seq(1,length(ants)) ) {
a <- ants[i];
a$identifications()[1]$setUserAntDefinedAntPose(c(x,y),angle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment