Disabling autolock option for the mBot2 encoder motors


#1

Hi. The “mBot2 Chassis” package contains a procedure to enable/disable the wheel lock (after a move instruction, I guess). But I can’t program the “disable” option, to get a smooth robot movement when successive move instructions are executed.
Please, any suggestions?


#2

Hi @arleguip,
If you are talking about this block:
image

It basically unlocks the wheels when the robot is not moving. After moving, the wheels lock to keep it in place, and this unlocks the wheels. I’m pretty sure (I will test this tomorrow) that after using any move block, like move forward, turn, etc., the wheels are automatically locked again, so you would have to unlock the wheels every time. For precise movement like ‘move forward 1 cm’, I’m not sure if the unlock feature even applies.

I’ll try to do some testing tomorrow and let you know if I find out anything.

Good luck! :slight_smile:


#3

Hi @arleguip, from my tests today, disabling the autolock only does something if the mBot is not moving.


#4

Thank you very much for your kind reply.
I will try to redefine my question:
When the instruction
image
has a relatively high rpm value, the robot has an initial acceleration peak with a jump and a skidding of its wheels that affects the linearity of the movement…
A smoother movement with a progressive increase in speed in the initial moments would be desirable.
An intuitive programming for this would be:


But the robot’s brake after each instruction generates a “micro-stop” that returns the speed value to zero, the robot stops and all smoothness of movement is eliminated…
Sadly, incorporating one or several instructions
image
in any part of the program does not solve the above problem…
Could you suggest a solution? Thank you very much


#5

Hi @arleguip, I’ve made a solution to this before and will try to redo it and get it to you next week. Good luck! :smiley:


#6

Hi @Best_codes . Thanks a lot for your help…


#7

@arleguip Try something like this:


#8

Thanks a lot @Best_codes. I’m going to try or maybe adapt this code… and I’ll send you back some conclusions. Thanks again.


#9

Be sure to let me know if you need any changes made!