From: Rasko P. <rpj...@gm...> - 2006-12-06 23:34:13
|
Hi Nate and everybody, I am using libgazebo to control the robot in the world that is DEM (its not flat! created by gzbuilder ) this is part of my .c code that is supposed to get the coordinates of the robot: printf("%0.3f %0.3f %0.3f\n", position->data->pos[0], position->data->pos[1], position->data->pos[2]); So when I run wxgazebo and my code I can see that my robot is moving on the terrain and X and Y coordinates are fine, but the Z coordinate is always 0.000 -3.594 5.788 0.000 -3.603 5.752 0.000 -3.603 5.752 0.000 -3.611 5.719 0.000 -3.611 5.719 0.000 -3.618 5.685 0.000 -3.618 5.685 0.000 I am not sure if its important but the model of my robot is Pioneer2DX. So what I am doing wrong? Thank you, Rasko |
From: Nate K. <nk...@ro...> - 2006-12-07 19:02:16
|
Hello Rasko, Well, you're not doing anything wrong. The robot just isn't returning a Z value. I assume you're using the Pioneer2DX or Pioneer2AT model, both of which only estimate a 2D pose (x,y,yaw). A Z value is not returned because the Pioneer does not come equipped with an IMU. However, you can get the absolute Z value of the robot with a single line change. For example, in the Pioneer2DX model, look in the PutPositionData function, and add this line: this->position_iface->data->pos[2] = this->GetPose().pos.z; I haven't actually tested this line, but it should work. -nate On 12/6/06, Rasko Pjesivac <rpj...@gm...> wrote: > Hi Nate and everybody, > > I am using libgazebo to control the robot in the world that is DEM (its > not flat! created by gzbuilder ) > > this is part of my .c code that is supposed to get the coordinates of the > robot: > > printf("%0.3f %0.3f %0.3f\n", > position->data->pos[0], position->data->pos[1], > position->data->pos[2]); > > So when I run wxgazebo and my code I can see that my robot is moving on > the terrain and X and Y coordinates are fine, but the Z coordinate is > always 0.000 > > -3.594 5.788 0.000 > -3.603 5.752 0.000 > -3.603 5.752 0.000 > -3.611 5.719 0.000 > -3.611 5.719 0.000 > -3.618 5.685 0.000 > -3.618 5.685 0.000 > > I am not sure if its important but the model of my robot is Pioneer2DX. > So what I am doing wrong? > > Thank you, > > Rasko > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > Playerstage-gazebo mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > > > |
From: Rasko P. <rpj...@gm...> - 2006-12-10 21:19:20
|
Hi Nate and everybody else, But which models are designed to estimate a 3D pose (x,y,z) ?? Atrv and B21R? and these 2 models are not enabled by default in configure? Thanks, Rasko On 12/7/06, Nate Koenig <nk...@ro...> wrote: > > Hello Rasko, > > Well, you're not doing anything wrong. The robot just isn't returning > a Z value. I assume you're using the Pioneer2DX or Pioneer2AT model, > both of which only estimate a 2D pose (x,y,yaw). A Z value is not > returned because the Pioneer does not come equipped with an IMU. > > However, you can get the absolute Z value of the robot with a single > line change. For example, in the Pioneer2DX model, look in the > PutPositionData function, and add this line: > > this->position_iface->data->pos[2] = this->GetPose().pos.z; > > I haven't actually tested this line, but it should work. > > -nate > > |