From: brian g. <ge...@ro...> - 2003-11-09 17:13:09
|
hi Vik, M_PI is the mathematical constant pi. PlayerRobotParams is a table of constants for ActivMedia robots. When connecting to the robot, it gives its type (e.g., "Pioneer p2dx"), and we do a lookup in that table to determine which constants to use. Apparently, DiffConvFactor is 1/r, where r is 1/2 of the axle length (i.e., the distance between the wheels) in mm. For the p2dx: DiffConvFactor = 0.005600 2 * (1/DiffConvFactor) = 357.14285714285717 Which gives the p2dx axle as about 35cm long, which seems right. Regarding Stage, the position model is not detailed enough to specify the axle length independently of the robot size. So the 'size' value effectively determines the axle length. Looking at the 'pioneer.inc' file, the 'pioneer2dx' is specified as follows: define pioneer2dx position ( size [.440 .330] offset [-0.04 0.0] p2dx_sonar() power() ) So this robot is 44cm long (front to back) and 33cm wide (wheel to wheel), with its center of rotation 4cm behind the center of the robot (all ActivMedia robots have offset centers of rotation; I've never understood why they build them like that). You can of course change the size of your simulated robot to be whatever you like (e.g., make it match the physical robot that you have in mind). brian. |