Re: Braitenberg Vehicle

jon klein <[email protected]> Mon, 25 Jul 2005 11:32:28 -0400
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
On Jul 22, 2005, at 6:32 PM, Anand Veeraswamy wrote:

> Hi All,
>
> I am a novice at breve. So this question might be a basic problem  
> for the rest but I would appreciate it if someone could clarify my  
> query.
>
> I am working on a project using the Braitenberg Vehicles. I need to  
> make this vehicle to turn right and left. How do I go about doing  
> this?
>
> I tried using the following method
>    +to moveleft:
>                vehicle rotate around-axis (0,1,0) by 1.
>
> But I am not very sure about how I would go about calculating the  
> axis and also by what amount I should turn it to take a left turn.

Since you want to turn the vehicle left or right, the axis of  
rotation (0, 1, 0) is correct -- you'll pivot the vehicle around the  
Y-axis.  The amount is the angle, in radians, so 90 degrees would be  
about 1.57.

But the rotate method will cause the vehicle to change heading all at  
once, and may cause weird behavior as the physics tries to cope with  
the sudden (and unrealistic) change.  A better way to make the  
vehicle turn left and right would be to change the speed of the left  
or right wheels.  You can do this, for example, with the method set- 
natural-velocity.

- jon klein
_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve