Robo Home | Changes | Preferences | AllPages

How many radians the opponent is moving relative to you per tick.

Equal to the enemy's lateral velocity divided by their distance from you.


An enemy 100 units away is driving forwards perpendicular to you at 8 units / tick. They are going counterclockwise around you. Their LateralVelocity is -8 since they are going counterclockwise. Their AngularVelocity is -.08.

An enemy 200 units away is driving backwards towards you at 8 units / tick. They are going clockwise around you. They are 30 degrees off from going straight at you. Their velocity is -8 since they are moving backwards. Their LateralVelocity is +4, positive because they are moving clockwise and 4 because they are 30 degrees off from approaching you directly, and the sine of 30 degrees is .5. Their AngularVelocity is .02.

How to calculate:

 Velocity: scannedRobotEvent?.getVelocity()
 LateralVelocity: velocity * Math.sin(scannedRobotEvent?.getHeadingRadians() - scannedRobotEvent?.getBearingRadians?() + getHeadingRadians())
 AngularVelocity: lateralVelocity / scannedRobotEvent?.getDistance()


If you are segmenting on lateral velocity and distance already this isn't providng any more information, right? Well depending on the exact buckets I guess. But it could help reduce those two into one segementation (but not fully)? -- Pulsar

I don't really understand the question asked here. I doubt using angular velocity would really allow you to reduce segmentation though. If you don't have the distance segmentation there's instead the risk that you get quite polluted data buckets I think. -- PEZ

Well I wasn't very clear I guess. I'm trying to concentrate on writing a bot but just end up reading more and more, testing and watching. Trying roborumble etc etc Then it's time for sleep and work :) Let me rephrase the question/statement evne though it's late and I might make it worse! Let's say you have your data segmented into distance and lateral velocity. If you would add a segment of let's say x=distance*latervelocity that would be meaningless as that is what you are already doing but even more segmented. Division should amount to the same thing, sort of. Am I making any sense? -- Pulsar

Yes, I totally agree. I tend to segment on primitive data and let the more sophisticated segmentations sort them self out in this matrix. Like I segment on velocity and last_tick_velocity instead of segmenting on acceleration. -- PEZ

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited April 26, 2004 23:25 EST by PEZ (diff)