[Dprglist] First BBR implementation and some questions

Thalanayar Muthukumar tnkumar at gmail.com
Sun Oct 31 16:39:09 PDT 2021


Understood the considerations for loop time. I will possibly stay with 50 ms for now.

Regards.
- Kumar

Sent from my iPhone

> On Oct 31, 2021, at 5:42 PM, Karim Virani <pondersome64 at gmail.com> wrote:
> 
> 
> The loop time is entirely up to you. The question is, how quickly does your robot need to react? That depends a lot on physics - on scale. It also depends on the needs of the most timing-sensitive (non-ISR) sensors you are managing, and how you service them. 
> 
> We don't even have a set loop time since we are using Android on most of our robots. Our loop time varies a lot, but is generally under 50ms. We normalize all our timing to seconds and our math looks like normal physics calculations vs. something short-cutted to a fixed timing loop. Granted, this is not a common approach in microcontroller-driven hobbyist robotics. Deemed wasteful of processing cycles by many. 
> 
>> On Sun, Oct 31, 2021 at 5:31 PM Thalanayar Muthukumar <tnkumar at gmail.com> wrote:
>> Makes sense Karim, that at all times, the robot is interruptible by higher priority events.
>> 
>> Is 50ms ok? Or is 20ms desirable?
>> 
>> Regards.
>> - Kumar
>> 
>> Sent from my iPhone
>> 
>>>> On Oct 31, 2021, at 5:26 PM, Karim Virani <pondersome64 at gmail.com> wrote:
>>>> 
>>> 
>>> I agree with Doug, you should never have blocking code unless you can dedicate a separate thread to it apart from your main loop's thread.
>>> 
>>> And not to start up the whole debate again, I personally vote that there is no use for ballistic behaviors. I treat them as an academic construct. There are plenty of uses of objective-oriented and terminating behaviors - including those where the objective is to last for a certain amount of time. But they should still be interruptible and cancellable by higher priority behaviors. 
>>> 
>>>> On Sun, Oct 31, 2021 at 5:08 PM Doug Paradis via DPRGlist <dprglist at lists.dprg.org> wrote:
>>>> Kumar,
>>>>     I always pass through the loop. So a 1 sec backwards maneuver would use a loop counter with a disengage value of 50 for a loop time of 20 mS. I am not using a multitasking framework, which opens up other possibilities. 
>>>> 
>>>> Regards 
>>>> Doug P.
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>>>> On Oct 31, 2021, at 4:54 PM, Thalanayar Muthukumar via DPRGlist <dprglist at lists.dprg.org> wrote:
>>>>>> 
>>>>> 
>>>>> https://youtu.be/fuFamNWyXc4 (~15 sec)
>>>>> 
>>>>> 20 times per sec
>>>>> - default behavior - go straight forward, green headlights
>>>>> - higher priority behavior - light sensed, turn left, red headlights
>>>>> 
>>>>> My understanding of BBR is that there should be no state maintained.
>>>>> 
>>>>> Question - If we trigger a ballistic behavior (e.g. go straight backward for one sec), is it ok to not return to the loop every 50 msec?
>>>>> 
>>>>> Or is it preferable to maintain state and count 20 times for getting duration of 1 sec?
>>>>> 
>>>>> Regards.
>>>>> - Kumar
>>>>> 
>>>>> 
>>>>> 
>>>>> Sent from my iPhone
>>>>> _______________________________________________
>>>>> DPRGlist mailing list
>>>>> DPRGlist at lists.dprg.org
>>>>> http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org
>>>> _______________________________________________
>>>> DPRGlist mailing list
>>>> DPRGlist at lists.dprg.org
>>>> http://lists.dprg.org/listinfo.cgi/dprglist-dprg.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dprg.org/pipermail/dprglist-dprg.org/attachments/20211031/aff78add/attachment.html>


More information about the DPRGlist mailing list