When my students are working with programing we are finding ModKIT to have some bugs. I’m trying to determine if it is a ModKIT issue or something in the brain.
We have switched out and used two different brains in an effort to exclude that as a factor.
Basically, they can run the exact same program 3 times and it only works correctly 1 out of every 3 times. Any advice?
It’d help if you give us an example program that you’re having issues with.
I’ve noticed a lot of issues with timing, it seems like Modkit sends messages “fire and forget” and you’re left to either wait between broadcast instructions some arbitrary length of time or find some other way to verify all listeners have completed their desired actions.
For example, if you’re having a motor move some arbitrary number of degrees/revolutions and something causes that motor to slow down and not reach the desired count in whatever time you’re waiting that motor will miss the next command.
I’m having trouble with my other password…so this is the same person as elfrazier. Attached are motors 1-5. This is just one program. It happens with all programs, it doesn’t matter if they are broadcasted or setup this way. We have also tried two different brains.
We had a similar experience that went away when we increased our wait times. You might try increasing each wait to 5 seconds or so, and see if the program responds like you expect.
From what I have observed, it looks like if your initial movement of 1.45 revolutions takes longer than your wait time of .5 seconds, the next broadcast (or maybe it is the motor output command within the next broadcast) is ignored.
If the time to complete the action is close to .5 seconds, sometimes taking longer, and sometimes shorter, the behavior can be erratic.
I am interested in the fix for this one. I would have though that the rotate by X degrees/rotations command should wait until the rotations are complete before executing the next instruction. Something we have noticed is that sometimes, the motor will acknowledge that the rotate command is complete (and therefore stop) but the brain doesn’t seem to get notified at the same time to execute the next instruction. A little nudge of the robot (so that the motor moves a fraction of a degree more) usually gets it to continue executing the rest of the program.
It’s almost like the two things work on slightly different resolutions and the motor stops before it has moved far enough for the brain to be notified.
We are sorry that you are having this problem with Modkit and the Smart Motor behavior.
What’s happening in this case is that all position-based Smart Motor commands wait until the motor reports that it is done before the program continues to the next command. In some situations where one motor takes slightly longer than another, or if something causes a motor to never reach its destination (such as commanding an arm to rotate further than it physically can), the program may get stuck or seem to have inconsistencies between running the program different times.
We understand that high precision control of your Smart Motor is very important to our users, and are currently working to address this issue as soon as possible.
In the mean time, this issue can be resolved by one of two ways:
Instead of adding Wait times in between the different actions for the motors, use broadcast events. In the Robot Brain tab, create a master program that calls each action one at a time. If multiple things need to happen at the same time (such as multiple motors for a drive train), use a variable to act as a done counter. At the end of each motor three, increment the done counter by one. Then the master program in the Robot Brain tab waits until it sees that everything is done before continuing.
If the program appears to get “stuck” at certain motor commands, change from a position motor command to a set velocity + wait for time motor command.
Again, we are sorry for these issues that you have encountered and are working to improve the performance of these features.
Art - thank you, we tried that way also. The team has been working on creating a broadcast program for 3 hours tonight, it worked fine until it started having an “unknown error” when downloading and now the program is unusable. I worked on it and tried taking it apart piece by piece to see if a certain part was pushing the error but no luck.
For the “unknown error” during downloading, is this occurring on every program download attempt? Does the same error occur on a new / blank program?
If you get “unknown error” even on a new blank program, it is possible that Modkit Link may have crashed during a download attempt and is now stuck. If this occurs, right click on the Modkit “M” icon in the system tray and then click Quit. Then relaunch Modkit Link from the Start menu or Desktop shortcut.
If I get a programming error and even after fixing this error, I can’t downlaod, then I have found that the modkit link is the problem. Having had an error seems to trigger the following behaviour.
I can’t download to the brain.I havesometimes found more then one running and sometimes even after restarting, the error continues. But if you persevere, then it does eventually re-connect.But having had the unknown error seems to initiate this.
I am also having issues with judging if a motor has completed or stopping it if it is overloaded. Using wait times for every action seems a bit crude. Surely the motor current should be something that we could use to monitor for example that the jaw has gripped as far as it can. I am not having any luck with parsing completed parameters or monitoring current and turning that into a semaphore. All because there isn’t a clean way of getting feedback from a routine or function call. Any one make progress in this area?