From: Hampus B. <Ham...@st...> - 2006-03-13 10:45:48
|
Hi! First of all, Radu many thx for the quick answer. I have yet another question, when using player with UsarSim there is some problems. I have made a program that listens to the keystrokes but when holding the= key down there are to many messages for the player to handle, this is ok but = when there is an overflow the systems sends crazy things. Here is an example: I want to drive forward and has made that so it sends=20 DRIVE left 1 right 1 But when the overflow occurs the systems sends DRIVE left 4.9292 right -4.9292 (or some other value) So my questions is Is there a default value or handling when the buffer is full and is there= any easy way to increase that buffer? Best regards Hampus Berg Uppsala University Sweden |
From: Toby C. <tco...@pl...> - 2006-03-13 12:55:19
|
Hi, The corruption when a buffer overflows is a serious problem and should not happen, but more info and debugging from your end will probably be needed to track it down. When the buffer is full the system should just discard messages. You could look into the SetReplaceRule method that has been talked about on the list a lot recently, but they probably wont do exactly what you want. As far as increasing the queue length, this is set at compile time Im think (anyone feel free to correct me) but should just be a constant in the code that you can increase and rebuild. Im a little confused as to where the keystrokes occur, if it is just in a player client you could filter and only send commands when there is a change in state (possibly with a fixed repeat period if the command is the same) this would reduce the network overhead as well and prevent buffers filling up and reduce latency when the command does change? but I could be getting this entirely wrong. Hope that helps a little, Toby Hampus Berg wrote: > Hi! > > First of all, Radu many thx for the quick answer. > I have yet another question, when using player with UsarSim there is some > problems. > I have made a program that listens to the keystrokes but when holding the key > down there are to many messages for the player to handle, this is ok but when > there is an overflow the systems sends crazy things. > > Here is an example: > > I want to drive forward and has made that so it sends > DRIVE left 1 right 1 > > But when the overflow occurs the systems sends > > DRIVE left 4.9292 right -4.9292 (or some other value) > > So my questions is > Is there a default value or handling when the buffer is full and is there any > easy way to increase that buffer? > > Best regards > Hampus Berg > Uppsala University > Sweden > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > |
From: Hampus B. <Ham...@st...> - 2006-03-13 13:23:30
|
Hi! Yes maybe I should explain better, this is the case. I am running player 1.6.5 at the moment, when using playerv I felt that I= lost to much control(I want to know what happens when I push buttons.. :) ). I felt the need for a program that controlled the robot according to my w= ishes. I snooped the messegaes sent from player to Usarsim, just to clarify what= was sent. I then made aprogram using an Unbuffered, NON-Blocking, Non-ECHO getchar() to get the keystroke directly but this imposed a problem as it seems. When holding the button down the system just sends A LOT of messages. When I psuh the buttons just a few times and then waits the robot acts "perfectly" but as said the problem occurs when holding down a button. This is one of the error messages I get, and remember that I only push th= e forward button, which sends=20 DRIVE {Left 1} {Right 1} =20 When holding down UsBot: not enough room in queue; disc<arding string: *DRIVE {Left -4.991642} {Right 4.991642} So I feel that there are at least 2 problems. Why do it discard a string that hasn't been sent? Why do the robot move like it got the message above? If you need anything more specific pls let me know. Best regards Hampus Citerar Toby Collett <tco...@pl...>: > Hi, > The corruption when a buffer overflows is a serious problem and should=20 > not happen, but more info and debugging from your end will probably be=20 > needed to track it down. When the buffer is full the system should just= =20 > discard messages. >=20 > You could look into the SetReplaceRule method that has been talked abou= t=20 > on the list a lot recently, but they probably wont do exactly what you = want. >=20 > As far as increasing the queue length, this is set at compile time Im=20 > think (anyone feel free to correct me) but should just be a constant in= =20 > the code that you can increase and rebuild. >=20 > Im a little confused as to where the keystrokes occur, if it is just in= =20 > a player client you could filter and only send commands when there is a= =20 > change in state (possibly with a fixed repeat period if the command is=20 > the same) this would reduce the network overhead as well and prevent=20 > buffers filling up and reduce latency when the command does change? but= =20 > I could be getting this entirely wrong. >=20 > Hope that helps a little, >=20 > Toby >=20 > Hampus Berg wrote: > > Hi! > >=20 > > First of all, Radu many thx for the quick answer. > > I have yet another question, when using player with UsarSim there is = some > > problems. > > I have made a program that listens to the keystrokes but when holding= the > key > > down there are to many messages for the player to handle, this is ok = but > when > > there is an overflow the systems sends crazy things. > >=20 > > Here is an example: > >=20 > > I want to drive forward and has made that so it sends=20 > > DRIVE left 1 right 1 > >=20 > > But when the overflow occurs the systems sends > >=20 > > DRIVE left 4.9292 right -4.9292 (or some other value) > >=20 > > So my questions is > > Is there a default value or handling when the buffer is full and is t= here > any > > easy way to increase that buffer? > >=20 > > Best regards > > Hampus Berg > > Uppsala University > > Sweden > >=20 > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > > that extends applications into web and mobile media. Attend the live > webcast > > and join the prime developer group breaking into this new coding > territory! > > http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=12164= 2 > > _______________________________________________ > > Playerstage-users mailing list > > Pla...@li... > > https://lists.sourceforge.net/lists/listinfo/playerstage-users > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > that extends applications into web and mobile media. Attend the live we= bcast > and join the prime developer group breaking into this new coding territ= ory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users >=20 |
From: Brian G. <br...@ge...> - 2006-03-13 18:10:37
|
On Mar 13, 2006, at 5:23 AM, Hampus Berg wrote: > > I am running player 1.6.5 at the moment, when using playerv I felt > that I lost > to much control(I want to know what happens when I push > buttons.. :) ). > I felt the need for a program that controlled the robot according > to my wishes. > > I snooped the messegaes sent from player to Usarsim, just to > clarify what was > sent. I then made aprogram using an Unbuffered, NON-Blocking, Non-ECHO > getchar() to get the keystroke directly but this imposed a problem > as it > seems. > When holding the button down the system just sends A LOT of messages. What is "the system"? Who is sending a LOT of messages to whom? > > This is one of the error messages I get, and remember that I only > push the > forward button, which sends > > DRIVE {Left 1} {Right 1} > > When holding down > > UsBot: not enough room in queue; disc<arding string: > *DRIVE {Left -4.991642} {Right 4.991642} That error is not coming from within any of the standard Player code. It looks like the problem lies in the driver that communicates between Player and UsarSim. You should contact the author(s) of that driver (I don't know whether they subscribe to this list). brian. |
From: Hampus B. <Ham...@st...> - 2006-03-13 19:15:55
|
Ok many thanks, but then I think it'll be easier if I write a new one, wi= ll send it to you guys when finished and tested. Best regards Hampus Citerar Brian Gerkey <br...@ge...>: >=20 > On Mar 13, 2006, at 5:23 AM, Hampus Berg wrote: >=20 > > > > I am running player 1.6.5 at the moment, when using playerv I felt =20 > > that I lost > > to much control(I want to know what happens when I push =20 > > buttons.. :) ). > > I felt the need for a program that controlled the robot according =20 > > to my wishes. > > > > I snooped the messegaes sent from player to Usarsim, just to =20 > > clarify what was > > sent. I then made aprogram using an Unbuffered, NON-Blocking, Non-ECH= O > > getchar() to get the keystroke directly but this imposed a problem =20 > > as it > > seems. > > When holding the button down the system just sends A LOT of messages. >=20 > What is "the system"? Who is sending a LOT of messages to whom? >=20 > > > > This is one of the error messages I get, and remember that I only =20 > > push the > > forward button, which sends > > > > DRIVE {Left 1} {Right 1} > > > > When holding down > > > > UsBot: not enough room in queue; disc<arding string: > > *DRIVE {Left -4.991642} {Right 4.991642} >=20 > That error is not coming from within any of the standard Player =20 > code. It looks like the problem lies in the driver that communicates =20 > between Player and UsarSim. You should contact the author(s) of that =20 > driver (I don't know whether they subscribe to this list). >=20 > brian. >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > that extends applications into web and mobile media. Attend the live we= bcast > and join the prime developer group breaking into this new coding territ= ory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users >=20 |