renatobianchini / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

SetMotorState needs to be called twice or more in order to run motors #208

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I noticed this issue on my application. It doesn't exists always but cannot say 
when yet. The first one makes motor make small beep and very small move. The 
second call to SetMotorState makes the programmed turn. Than I found it also 
exists on your demo app. I'm using NXT brick, FW 1.03, AVR 1.01, BC4 1.01, 
BUILD 2803060845.

I also noticed other issue but this one in my app (robot logic involved). When 
I rotate the robot (B - rotate forward, C - rotate backward, two separate 
SetMotorState calls) and then I break motors and B,C - move forward (one call 
SetMotorState with Motor.All) only motor connected to C is running.

Any ideas what might be wrong?

I think I could sniff the communication and send it to you. Would that be 
usefull to track down the issue?

Original issue reported on code.google.com by krzysztof.blacha on 28 Apr 2011 at 12:21

GoogleCodeExporter commented 8 years ago
Hard to say for sure where is the issue - in AForge.NET framework or in the 
Lego NXT. If AForge.NET sends command to NXT successfully and NXT replies 
without errors, then it is a problem of NXT in my opinion - if it does not do 
what it was instructed to do, then bug of NXT.

I've seen similar issues before. In my case it was caused only when setting low 
power for motors. However if power is set higher, then motor starts moving 
always.

Original comment by andrew.k...@gmail.com on 28 Apr 2011 at 8:11

GoogleCodeExporter commented 8 years ago
I was using power = 70 which in my opinion isn't a small value. I also updated 
FW to the newest available (1.29) and same issue exists. I will try set 100 and 
see what will happen.

Sorry bothering again but what about Issue #196 and 2.1.6, any estimates on 
release date? It could help me sniff the protocol and observe sent and received 
values.

Original comment by krzysztof.blacha on 28 Apr 2011 at 10:26

GoogleCodeExporter commented 8 years ago
If you would like I can give you the build of current trunk, so you can work 
with the latest version. However, I cannot say for sure about the next release 
date. For now I am not sure 2.1.6 will be released, but 2.2.0 is planned, which 
will have more features.

Original comment by andrew.k...@gmail.com on 28 Apr 2011 at 10:29

GoogleCodeExporter commented 8 years ago
Please prepare custom release of current trunk for me. Thank you

Original comment by krzysztof.blacha on 28 Apr 2011 at 12:25

GoogleCodeExporter commented 8 years ago
Described in the application problem may be caused by wrong usage of NXT 
protocol. Read this: "When we want the motor to execute a movement, we simply 
send the correct string to the according mailbox. >>> The motor for the 
specified port must be idle, i.e. it can't be carrying out any other movement 
commands at the time when the new command arrives. If this should happen, the 
NXT will indicate this erroneous user behavior by a signal (high and low beep) 
and will drop (ignore) the message.<<<" and in my opinion is not related to 
AForge implementation. Please close this issue.

Original comment by krzysztof.blacha on 16 May 2011 at 12:32

GoogleCodeExporter commented 8 years ago
This could be related to the issue as well:
http://www.aforgenet.com/forum/viewtopic.php?f=8&t=1263&p=2555&hilit=UPDATE_MODE
#p2554
Need to check about this UPDATE_MODE bit ...

Original comment by andrew.k...@gmail.com on 16 May 2011 at 8:40