brian gerkey wrote:
> hi Vik,
> On Fri, 24 Oct 2003, Vikram Harinath wrote:
> > After speaking with my group partner who is developing the wheel encoders:
> > We have a four wheeled walker. We have a wheel encoder attached to each rear
> > wheel of the walker. Both these wheel encoders are connected to a
> > microcontroller which then sends the data down ONE serial line.
> Hmmm..what's a wheeled walker? Like the kind that an elderly person
> would use for support? Or does it actually walk?
Yep. It is the kind that an elderly person would use for support. Its an assitive
robotic walker. It helps guide the person around a room depending on what the person
wants to do. So, for example, if the person wants to turn to avoid an obstacle, but
they arent turning fast enough, assistive braking will be applied to the two rear
wheels of the walker to help the person turn faster to avoid the obstacle.
> > The microcontroller accepts p2os commands i.e. I will be able to use the p2os
> > driver in order to read information from the wheel encoders. So no modification
> > of Player server is required as it should already work.
> Wow, that's cool; how did you manage that? Did you implement the P2OS
> protocol yourself in the micro?
I didn't do this. This was done by another student.
> > Now, the information I wish to read is the individual speeds of each wheel. I
> > was wondering how I would be able to do this using the PositionProxy? So, for
> > eg, if you have instantiated the proxy class [ PositionProxy pp(&roobot,0,'a')
> > ] you would use pp.speed in order to find out what the speed of the robot is.
> > So my questions relating to Player are: How do I tell the position interface to
> > use the p2os_position driver ?
> That easy; in your Player config file:
> position(driver "p2os_position")
> You can also specify a couple of P2OS-specific options within the
> parenthesis. Those options are listed in the manual:
> > And then once this is done, how do I get the
> > PositionProxy to tell me what the speed of each wheel is ?
> You can recover the individual wheelspeeds from the values of pp.speed
> and pp.turnrate values. Just invert the transformation that's done
> in the P2OS driver (look in server/drivers/mixed/p2os/sip.cc, SIP::Fill()).
I assume the lines you are talking about here are the following:
data->position.xspeed = htonl((int32_t) (((lvel) + (rvel) ) / 2));
data->position.yawspeed =htonl((int32_t) (180*((double)(rvel - lvel) /
(2.0/PlayerRobotParams[param_idx].DiffConvFactor)) / M_PI));
Ok. Here's the problem. We are not controlling the speeds of the wheels using motors
- we are using brakes. I was under the impression that I would not be able to use
pp.turnrate if I wasn't using motors to contol the wheels.
Am I wrong here? If I am not, how would I do it? Is there a way to just get the
values of rvel and lvel (which I assume are right velocity and left velocity)
> > My question relating to Stage: How would I set up the above in stage ? i.e.
> > what do I have to do in order to set up stage to simulate my walker (for which
> > I have all the measurements for) walking around in an environment (keeping it
> > as simple.world for now) and use PositionProxy to tell me the speed of each
> > rear wheel of the walker. This is so I can test out my code with Stage before I
> > test it on the actual walker itself.
> Well, remembering that Stage is a strictly 2-D simulator, all you need
> to do is instantiate a position model with appropriate width and height.
> Look in the Stage distro at worlds/pioneer.inc for an example of defining
> a Pioneer as a position model with the right dimensions and rotational
Hmm. Ok. I'll look into this further and see how I go.
> Something occurs to me here: the p2os driver has a hardcoded table
> of relevant parameters, such as encoder ticks per wheel rotation and
> axle length, for all known P2OS-based robots (I created this table
> automatically by parsing the Saphira .p files). Depending on the robot
> "type" that is reported by the robot, the p2os driver will use the
> appropriate values, allowing it to work transparently on all such robots.
> If your walker doesn't exactly match an existing P2OS-based robot,
> then we'll need to add your parameters to the table.
I'm not sure about this. I will have to ask the student that is working on the wheel