NorthernStars Mixed-Reality Framework
MR-Framework & Example AI:
This project is maintained by NorthernStars
This sections describes how movements for the bot are calculated in MR-FWNS. Normally bot movements should be good. But you can modify behaviour using the bot mrlib library.
The physical bot moves using two wheels, on on the left, on at the right side of the robot.
By setting the speed for each wheel the bot moves into different directions.
The MR-FWNS Movement
action sets the wheels speed in a range of 0% to 100%.
Problems in bot moving occour if the bot tries to rotate to aim a target. Normally the bot couldn't target a specific angle. There's always a tolerance of a few degree between the view direction of the bot and the target due to physical tolerances and unprecise object recognition.
To handle these tolerances MR-FWNS bot mrlib library offers functions to calculate movements that include these tolerances. For example if the angle difference between the target and the bots view direction is below 10 degree the bot just moves forward or backward. If the angle difference is between 10 and 60 degree the bot turns into the targets direction but subtracts the difference angle from one of the wheels corresponding to the direction of the target. If the angle difference is above 60 degree the bot turns by settings one wheels speed to +100% and one to -100% (values -100 to +100).
So for several angle difference sections several behaviours are used.
You can modify the thresholds for every sections by changeing public static attributes of mrlib.core.MoveLib
class.
The chart shows the default values of the attributes moveAngleNoTurn
and moveAngleTurnAndMove
and how the different movements are constructed
using these attributes.
You can change them to make the bot turn earlier or later or adjusting the tolerance for moving to targets nearly in front / in rear of the bot.