# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## playerstage-users

 [Playerstage-users] GoTo() and Velocity From: p s - 2013-04-25 00:28:12 Attachments: Message as HTML ```Hi I'm new to using player stage and am trying to control my simulated robots speed as it moves between set coordinates using GoTo(). Here is my code: // Includes #include #include #include #include using namespace PlayerCc; using namespace std; #define DISTANCEDELTATHRESHOLD 0.01 // Initialization void moveTo(PlayerClient& myRobot, Position2dProxy& pp, double xDest, double yDest, double rad) { double distanceDelta = 1000; myRobot.Read(); //pp.SetSpeed(2.0, 0.0); pp.GoTo((player_pose2d_t){xDest,yDest,rad},(player_pose2d_t){10.0, 10.0, 0}); sleep(1); while(distanceDelta >= DISTANCEDELTATHRESHOLD) { myRobot.Read(); double x = pp.GetXPos(); double y = pp.GetYPos(); cout << "x :" << x << endl; cout << "y :" << y << endl; distanceDelta = (xDest - x) * (xDest - x) + (yDest - y) * (yDest - y); cout << distanceDelta << endl; sleep(1); } } int main(int argc, char *argv[]) { //Initialize x and y to prevent the code from locking during the while check in moveTo double x = 100; double y = 100; //make moveSize # of steps const int moveSize = 8; double move[][moveSize] ={ {-6,-2,-2,2,2,2,6,8}, {-4,-4,6,6,5,5,3,3} }; // Connect to the local player process on port 6665 PlayerClient myRobot("localhost", 6665); // Create a position 2d proxy Position2dProxy pp(&myRobot, 0); pp.RequestGeom(); for(int i = 0; i < moveSize; i++) { cout << "Moving to step #: " << i <
 Re: [Playerstage-users] GoTo() and Velocity From: Rich Mattes - 2013-04-25 02:51:58 Attachments: Message as HTML ```On 04/24/2013 08:28 PM, p s wrote: > > My problem is that in the "GoTo()" I can set the coordinates I desire > my robot to go to but I can't seem to change its speed as it moves > between points. If I try to use the "SetSpeed()" function I can alter > the speed but I can no longer move to a desired coordinate position. > Is there a way to control the speed as the robot moves to a distinct > set of coordinates? I have done a lot of research, read theFAQs, > checked the mailing list. What am I missing? > > Thanks! > > ~Brennan > Have you tried issuing another GoTo(pos, vel) with the same position and a slower velocity? Rich ```
 Re: [Playerstage-users] GoTo() and Velocity From: p s - 2013-04-27 19:33:48 Attachments: Message as HTML ```Hi Rich, I would have replied sooner but I wanted to try it again. Yes I have tried giving it a slower velocity. The line of code looks like this: pp.GoTo((player_pose2d_t){xDest,yDest,rad},(player_pose2d_t){0.10, 0.0, 0.0}); This did not change the speed of the robot at all. I also tried it like this : pp.GoTo((player_pose2d_t){xDest,yDest,rad},0.5); but that gave me a compile error. Any thoughts? >Have you tried issuing another GoTo(pos, vel) with the same position and >a slower velocity? >Rich On Wed, Apr 24, 2013 at 8:28 PM, p s wrote: > Hi I'm new to using player stage and am trying to control my simulated > robots speed as it moves between set coordinates using GoTo(). Here is > my code: > > // Includes > #include > #include > #include > #include > > using namespace PlayerCc; > using namespace std; > #define DISTANCEDELTATHRESHOLD 0.01 > // Initialization > > > void moveTo(PlayerClient& myRobot, Position2dProxy& pp, double xDest, > double yDest, double rad) > { > double distanceDelta = 1000; > > myRobot.Read(); > //pp.SetSpeed(2.0, 0.0); > pp.GoTo((player_pose2d_t){xDest,yDest,rad},(player_pose2d_t){10.0, > 10.0, 0}); > sleep(1); > while(distanceDelta >= DISTANCEDELTATHRESHOLD) > { > > myRobot.Read(); > double x = pp.GetXPos(); > double y = pp.GetYPos(); > > cout << "x :" << x << endl; > cout << "y :" << y << endl; > distanceDelta = (xDest - x) * (xDest - x) + (yDest - y) * (yDest - y); > cout << distanceDelta << endl; > sleep(1); > } > } > > > int main(int argc, char *argv[]) > { > //Initialize x and y to prevent the code from locking during the > while check in moveTo > double x = 100; > double y = 100; > //make moveSize # of steps > const int moveSize = 8; > double move[][moveSize] ={ > {-6,-2,-2,2,2,2,6,8}, > {-4,-4,6,6,5,5,3,3} > }; > // Connect to the local player process on port 6665 > PlayerClient myRobot("localhost", 6665); > > // Create a position 2d proxy > Position2dProxy pp(&myRobot, 0); > pp.RequestGeom(); > > for(int i = 0; i < moveSize; i++) > { > cout << "Moving to step #: " << i < moveTo(myRobot, pp, move[0][i], move[1][i],0); > } > > // 0 of program > return 0; > } > > And my config file: > > # Desc: Player sample configuration file for controlling Stage devices > # Author: Richard Vaughan > # Date: 1 December 2004 > > # CVS: \$Id: simple.cfg,v 1.35 2008-01-15 01:25:42 rtv Exp \$ > > > # load the Stage plugin simulation driver > driver > ( > name "stage" > provides [ "simulation:0" ] > plugin "stageplugin" > > # load the named file into the simulator > worldfile "midterm.world" > ) > > # Create a Stage driver and attach position2d and laser interfaces > # to the model "r0" > driver > ( > name "stage" > provides [ "6665:position2d:0" "6665:ranger:0" "6665:ranger:1" ] > model "r0" > ) > > driver > ( > name "stage" > provides [ "6666:position2d:0" "6666:ranger:0" "6666:ranger:1" ] > model "r1" > ) > > driver > ( > name "goto" > provides ["position2d:100" "dio:0"] > requires ["position2d:0"] > debug 1 > reactive 1 > ) > > My problem is that in the "GoTo()" I can set the coordinates I desire > my robot to go to but I can't seem to change its speed as it moves > between points. If I try to use the "SetSpeed()" function I can alter > the speed but I can no longer move to a desired coordinate position. > Is there a way to control the speed as the robot moves to a distinct > set of coordinates? I have done a lot of research, read theFAQs, > checked the mailing list. What am I missing? > > Thanks! > > ~Brennan > ```
 Re: [Playerstage-users] GoTo() and Velocity From: p s - 2013-04-27 21:02:54 Attachments: Message as HTML ```I forgot to mention, I'm running player v4.0.0 and stage v3.2.2 On Sat, Apr 27, 2013 at 3:33 PM, p s wrote: > Hi Rich, > I would have replied sooner but I wanted to try it again. > > Yes I have tried giving it a slower velocity. The line of code looks like this: > pp.GoTo((player_pose2d_t){xDest,yDest,rad},(player_pose2d_t){0.10, 0.0, 0.0}); > > This did not change the speed of the robot at all. > > I also tried it like this : > pp.GoTo((player_pose2d_t){xDest,yDest,rad},0.5); > > but that gave me a compile error. > > Any thoughts? > > > > >Have you tried issuing another GoTo(pos, vel) with the same position and > >a slower velocity? > > >Rich > > > > > On Wed, Apr 24, 2013 at 8:28 PM, p s wrote: > >> Hi I'm new to using player stage and am trying to control my simulated >> robots speed as it moves between set coordinates using GoTo(). Here is >> my code: >> >> // Includes >> #include >> #include >> #include >> #include >> >> using namespace PlayerCc; >> using namespace std; >> #define DISTANCEDELTATHRESHOLD 0.01 >> // Initialization >> >> >> void moveTo(PlayerClient& myRobot, Position2dProxy& pp, double xDest, >> double yDest, double rad) >> { >> double distanceDelta = 1000; >> >> myRobot.Read(); >> //pp.SetSpeed(2.0, 0.0); >> pp.GoTo((player_pose2d_t){xDest,yDest,rad},(player_pose2d_t){10.0, >> 10.0, 0}); >> sleep(1); >> while(distanceDelta >= DISTANCEDELTATHRESHOLD) >> { >> >> myRobot.Read(); >> double x = pp.GetXPos(); >> double y = pp.GetYPos(); >> >> cout << "x :" << x << endl; >> cout << "y :" << y << endl; >> distanceDelta = (xDest - x) * (xDest - x) + (yDest - y) * (yDest - >> y); >> cout << distanceDelta << endl; >> sleep(1); >> } >> } >> >> >> int main(int argc, char *argv[]) >> { >> //Initialize x and y to prevent the code from locking during the >> while check in moveTo >> double x = 100; >> double y = 100; >> //make moveSize # of steps >> const int moveSize = 8; >> double move[][moveSize] ={ >> {-6,-2,-2,2,2,2,6,8}, >> {-4,-4,6,6,5,5,3,3} >> }; >> // Connect to the local player process on port 6665 >> PlayerClient myRobot("localhost", 6665); >> >> // Create a position 2d proxy >> Position2dProxy pp(&myRobot, 0); >> pp.RequestGeom(); >> >> for(int i = 0; i < moveSize; i++) >> { >> cout << "Moving to step #: " << i <> moveTo(myRobot, pp, move[0][i], move[1][i],0); >> } >> >> // 0 of program >> return 0; >> } >> >> And my config file: >> >> # Desc: Player sample configuration file for controlling Stage devices >> # Author: Richard Vaughan >> # Date: 1 December 2004 >> >> # CVS: \$Id: simple.cfg,v 1.35 2008-01-15 01:25:42 rtv Exp \$ >> >> >> # load the Stage plugin simulation driver >> driver >> ( >> name "stage" >> provides [ "simulation:0" ] >> plugin "stageplugin" >> >> # load the named file into the simulator >> worldfile "midterm.world" >> ) >> >> # Create a Stage driver and attach position2d and laser interfaces >> # to the model "r0" >> driver >> ( >> name "stage" >> provides [ "6665:position2d:0" "6665:ranger:0" "6665:ranger:1" ] >> model "r0" >> ) >> >> driver >> ( >> name "stage" >> provides [ "6666:position2d:0" "6666:ranger:0" "6666:ranger:1" ] >> model "r1" >> ) >> >> driver >> ( >> name "goto" >> provides ["position2d:100" "dio:0"] >> requires ["position2d:0"] >> debug 1 >> reactive 1 >> ) >> >> My problem is that in the "GoTo()" I can set the coordinates I desire >> my robot to go to but I can't seem to change its speed as it moves >> between points. If I try to use the "SetSpeed()" function I can alter >> the speed but I can no longer move to a desired coordinate position. >> Is there a way to control the speed as the robot moves to a distinct >> set of coordinates? I have done a lot of research, read theFAQs, >> checked the mailing list. What am I missing? >> >> Thanks! >> >> ~Brennan >> > > ```
 Re: [Playerstage-users] GoTo() and Velocity From: Rich Mattes - 2013-04-28 23:18:54 Attachments: Message as HTML ```> On Wed, Apr 24, 2013 at 8:28 PM, p s > > wrote: > > > > > driver > ( > name "goto" > provides ["position2d:100" "dio:0"] > requires ["position2d:0"] > debug 1 > reactive 1 > ) > The goto driver defaults to a min velocity of 0.1 m/s and a max velocity of 0.7 m/s [1]. If you're sending a 10 m/s command you won't see any variation until you get to values much lower. You can try changing the min/max velocites to be within your rane of expected commands. Rich [1] http://playerstage.sourceforge.net/doc/Player-svn/player/group__driver__Goto.html ```
 Re: [Playerstage-users] GoTo() and Velocity From: p s - 2013-05-03 03:41:43 Attachments: Message as HTML ```Sorry for the late reply! Finals have been tough. As for the program: Changing the max speed did not work. The robot kept the same speed. We tried all our previously noted methods, slower, faster, nothing worked. Is our configuration file correct? Are we missing a driver? Is there any online resource that can show us how a simple robot can move and change the velocity using *any* sort of GoTo() method? Any robot type, any example. We've even kicked around the idea of inverse kinematics to figure out wheel speeds and then change that into the setspeed() function, but we simply don't have the time to work it out. This project is due very soon and we're starting to get nervous. *Any* help at all is really appreciated. On Sun, Apr 28, 2013 at 7:18 PM, Rich Mattes wrote: > > On Wed, Apr 24, 2013 at 8:28 PM, p s wrote: >> >>> >>> >>> >>> driver >>> ( >>> name "goto" >>> provides ["position2d:100" "dio:0"] >>> requires ["position2d:0"] >>> debug 1 >>> reactive 1 >>> ) >>> >>> > The goto driver defaults to a min velocity of 0.1 m/s and a max velocity > of 0.7 m/s [1]. If you're sending a 10 m/s command you won't see any > variation until you get to values much lower. You can try changing the > min/max velocites to be within your rane of expected commands. > > Rich > > [1] > http://playerstage.sourceforge.net/doc/Player-svn/player/group__driver__Goto.html > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr > _______________________________________________ > Playerstage-users mailing list > Playerstage-users@... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > > ```
 Re: [Playerstage-users] GoTo() and Velocity From: Rich Mattes - 2013-05-03 21:31:36 Attachments: Message as HTML ```On 05/02/2013 11:41 PM, p s wrote: > Sorry for the late reply! Finals have been tough. > > As for the program: > Changing the max speed did not work. The robot kept the same speed. We > tried all our previously noted methods, slower, faster, nothing worked. > > Is our configuration file correct? Are we missing a driver? Is there > any online resource that can show us how a simple robot can move and > change the velocity using _any_ sort of GoTo() method? Any robot type, > any example. > > We've even kicked around the idea of inverse kinematics to figure out > wheel speeds and then change that into the setspeed() function, but we > simply don't have the time to work it out. > > > This project is due very soon and we're starting to get nervous. > > _Any_ help at all is really appreciated. > Stage also has the capability to set min and max speeds for models[1]. If you're using the pioneer model, you need to edit pioneer.inc and change the velocity bounds. Rich [1] http://rtv.github.io/Stage/group__model__position.html ```
 Re: [Playerstage-users] GoTo() and Velocity From: Richard Vaughan - 2013-05-05 18:15:42 ```Looks like no one can remember the details of that code. Have you had a look at the code? On Fri, May 3, 2013 at 2:31 PM, Rich Mattes wrote: > On 05/02/2013 11:41 PM, p s wrote: > > Sorry for the late reply! Finals have been tough. > > As for the program: > Changing the max speed did not work. The robot kept the same speed. We tried > all our previously noted methods, slower, faster, nothing worked. > > Is our configuration file correct? Are we missing a driver? Is there any > online resource that can show us how a simple robot can move and change the > velocity using any sort of GoTo() method? Any robot type, any example. > > We've even kicked around the idea of inverse kinematics to figure out wheel > speeds and then change that into the setspeed() function, but we simply > don't have the time to work it out. > > > This project is due very soon and we're starting to get nervous. > > Any help at all is really appreciated. > > > Stage also has the capability to set min and max speeds for models[1]. If > you're using the pioneer model, you need to edit pioneer.inc and change the > velocity bounds. > > Rich > > [1] http://rtv.github.io/Stage/group__model__position.html > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Playerstage-users mailing list > Playerstage-users@... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > ```