Install was successful.
And I can run "laserobstacleavoid" example in
"player-3.0.1/examples/libplayerc++".
However, when I run goto example with compile
$ g++ -o goto `pkg-config --cflags playerc++` goto.cc `pkg-config --libs
playerc++`
robot does not move.
My player cfg file is
# load the Stage plugin simulation driver
driver
(
name "stage"
provides [ "simulation:0" ]
plugin "stageplugin"
# load the named file into the simulator
worldfile "mysimple.world"
)
# Create a Stage driver and attach position2d and laser interfaces
# to the model "r0"
driver
(
name "stage"
#provides [ "position2d:0" "laser:0" "speech:0" "graphics2d:0"
"graphics3d:0" ]
provides [ "position2d:0" "sonar:0" "graphics2d:0" "graphics3d:0" ]
model "r0"
)
I changed from "laser:0" to "sonar:0" for running "goto" example.
I inserted several "cout" for debugging.
void
position_goto(player_pose2d_t target)
{
using namespace PlayerCc;
double dist, angle;
std::cout << "hi" << std::endl;
std::cout << pp->GetXPos() << std::endl;
dist = sqrt((target.px - pp->GetXPos())*
(target.px - pp->GetXPos()) +
(target.py - pp->GetYPos())*
(target.py - pp->GetYPos()));
angle = atan2(target.py - pp->GetYPos(),
target.px - pp->GetXPos());
double newturnrate = 0;
double newspeed = 0;
std::cout << "hi2" << std::endl;
I can find "hi" but I cannot find "hi2".
This means that routine is stucked in computation of dist and angle
variables.
Do you have any ideas for this problem?
--
Contact Information
Hyon Lim
Ph.D. candidate
Intelligent Control Systems Laboratory
School of Mechanical & Aerospace Engineering
Seoul National University (SNU)
Republic of Korea
Office. +82 2 880 1552
Mobile. +82 10 8212 1240
E-mail. alex at alexlab.net
http://www.alexlab.net
http://icsl.snu.ac.kr
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo