Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Playerstage-users] position2d and odometry under stage

 Re: [Playerstage-users] position2d and odometry under stage From: Matthieu Rakotojaona - 2011-03-30 12:57:35 ```On Wed, Mar 30, 2011 at 2:41 PM, pablis wrote: > > > e.g. if the robot in stage says it's at (1, 2, Pi/2), and I issue > SetOdometry(-1, 1, Pi), the stage simulation shows the robot still to be at > (1, 2, Pi/2). This is not what you want. Odometry (check Wikipedia) is just recording the movement of the wheels over time, to estimate the position of the robot relative to where it started. When your simulation begins, it is set to 0 (or it should be). When your robot moves 1m straight, wherever he starts, GetOdometry will return you (1,0,0) : your robot has moved 1m in the direction it was facing when it started. But it has no idea about its absolute position. > Anyone know how I might achieve the desired effect? What you want may be GoTo(-1,1,Pi). Or code your own goto function The problem is, you'd have to know where the absolute Origin is when you place your robots, and you can't know it for sure unless you cheat because the robot only knows where it started : http://rtv.github.com/Stage/group__model__position.html > Thanks Hope it helped. -- Matthieu RAKOTOJAONA ```

 [Playerstage-users] position2d and odometry under stage From: pablis - 2011-03-30 12:41:45 ```Hi all, Quick one this: if I'm running a stage simulation, and I issue a SetOdometry command from within my program, why do the results not show up in Stage? e.g. if the robot in stage says it's at (1, 2, Pi/2), and I issue SetOdometry(-1, 1, Pi), the stage simulation shows the robot still to be at (1, 2, Pi/2). I would have expected such changes to show up in Stage. Maybe Stage is overiding these commands since it "provides" the position2d according to the cfg file... :confused: Anyone know how I might achieve the desired effect? Thanks -- View this message in context: http://old.nabble.com/position2d-and-odometry-under-stage-tp31276810p31276810.html Sent from the playerstage-users mailing list archive at Nabble.com. ```
 Re: [Playerstage-users] position2d and odometry under stage From: pablis - 2011-03-30 12:56:17 ```Hmm... SetOdometry transforms the robots' frame of reference, but does not actually move the robot physically. I knew that anyway. What I really should've asked is how do I remotely set the Stage robot positions relative to the Stage frame of reference. This is purely for initialization purposes. Suppose I could just use the config files... problem solved (although would be convenient sometimes to do it remotely too!) -- View this message in context: http://old.nabble.com/position2d-and-odometry-under-stage-tp31276810p31276942.html Sent from the playerstage-users mailing list archive at Nabble.com. ```
 Re: [Playerstage-users] position2d and odometry under stage From: Richard Vaughan - 2011-03-30 16:47:01 ```If you're using player/stage, use the simulation interface. Position2d doesn't support magically moving robots, since it has to work on real robots. The simulation interface can do all the magic things. If you're using stage or libstage without player, just call model::setpose() Rtv On 2011-03-30, at 6:04, pablis wrote: > > Hmm... SetOdometry transforms the robots' frame of reference, but does not > actually move the robot physically. > > I knew that anyway. What I really should've asked is how do I remotely set > the Stage robot positions relative to the Stage frame of reference. This is > purely for initialization purposes. Suppose I could just use the config > files... problem solved (although would be convenient sometimes to do it > remotely too!) > > -- > View this message in context: http://old.nabble.com/position2d-and-odometry-under-stage-tp31276810p31276942.html > Sent from the playerstage-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Busines > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Chec > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Playerstage-users mailing list > Playerstage-users@... > https://lists.sourceforge.net/lists/listinfo/playerstage-users ```
 Re: [Playerstage-users] position2d and odometry under stage From: Matthieu Rakotojaona - 2011-03-30 12:57:35 ```On Wed, Mar 30, 2011 at 2:41 PM, pablis wrote: > > > e.g. if the robot in stage says it's at (1, 2, Pi/2), and I issue > SetOdometry(-1, 1, Pi), the stage simulation shows the robot still to be at > (1, 2, Pi/2). This is not what you want. Odometry (check Wikipedia) is just recording the movement of the wheels over time, to estimate the position of the robot relative to where it started. When your simulation begins, it is set to 0 (or it should be). When your robot moves 1m straight, wherever he starts, GetOdometry will return you (1,0,0) : your robot has moved 1m in the direction it was facing when it started. But it has no idea about its absolute position. > Anyone know how I might achieve the desired effect? What you want may be GoTo(-1,1,Pi). Or code your own goto function The problem is, you'd have to know where the absolute Origin is when you place your robots, and you can't know it for sure unless you cheat because the robot only knows where it started : http://rtv.github.com/Stage/group__model__position.html > Thanks Hope it helped. -- Matthieu RAKOTOJAONA ```