nao robot - Python To Modify .xar -
i'm working nao robotic system developed aldebaran robotics, trying on fly change values of behaviour file our study. these files stored as: /behaviours/filename.xar
these files have fair amount of code in them, , want able modify values of each motor on fly.
.... <actuatorcurve name="value" actuator="headpitch" recordable="1" mute="0" unit="-1"> <key frame="15" value="16.9607" /> <key frame="20" value="16.9607" /> <key frame="25" value="16.8198" /> <key frame="30" value="16.9607" /> <key frame="35" value="16.8198" /> <key frame="40" value="16.9607" /> <key frame="45" value="16.8198" /> <key frame="50" value="16.9607" /> <key frame="55" value="16.8198" /> </actuatorcurve> ...
there various other actuatorcurves different motors in shoulders, arms, hands, legs, etc of robot. i'm trying to figure out way in able open file, search , find values in headpitch motor, modify said values, , save file.
i know users here code shown have done far, haven't written yet. i'm in process of trying figure out best way go this.
there possibility of creating multiple files @ 100% head nodding, 110%, etc. time consuming, , takes unnecessary room on robots hard drive.
there's many way that.
what request should like: - open file - parse file using minidom format xml - change - save it
but depending of frequency of changes, it's not idea (cpu consuming).
a better way load/parse/change, instead of saving it, directly send new timeline motion module using motion.angleinterpolationbezier.
other ways export timeline python using "export motion clipboard" use pure python modify timeline arrays, save it, ...
Comments
Post a Comment