player-3.0.1/examples/libplayerc++/ does not work! (Ubuntu 9.10)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

player-3.0.1/examples/libplayerc++/ does not work! (Ubuntu 9.10)

Hyon Lim
Install was successful.

And I can run "laserobstacleavoid" example in

However, when I run goto example with compile

$ g++ -o goto `pkg-config --cflags playerc++` `pkg-config --libs

robot does not move.

My player cfg file is

# load the Stage plugin simulation driver
  name "stage"
  provides [ "simulation:0" ]
  plugin "stageplugin"

  # load the named file into the simulator
  worldfile ""

# Create a Stage driver and attach position2d and laser interfaces
# to the model "r0"
  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.

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()) +
              ( - pp->GetYPos())*
              ( - pp->GetYPos()));

  angle = atan2( - 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

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
Download Intel&#174; 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.
Playerstage-gazebo mailing list
[hidden email]