Last active
June 15, 2020 19:49
-
-
Save atuleu/76a5501540c14042f232d5677a7494a0 to your computer and use it in GitHub Desktop.
#FortMyrmidon Set Ant orientation manually
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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