Quantcast

laser with stage 4

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

laser with stage 4

light86
hi every body i know that is a change with laser with stage4 but i don't find any tutorial to use laser with stage 4
please how I can use the tutorial of jenny owen with stage 4
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: laser with stage 4

Richard Vaughan-2
Stage 4 uses the ranger interface instead. It's very similar - just look at the examples in <stage>/worlds and compare them with the laser examples from the tutorials and you'll get the idea.

- rtv


On Tue, May 28, 2013 at 10:15 AM, light86 <[hidden email]> wrote:
hi every body i know that is a change with laser with stage4 but i don't find
any tutorial to use laser with stage 4
please how I can use the tutorial of jenny owen with stage 4



--
View this message in context: http://player-stage-gazebo.10965.n7.nabble.com/laser-with-stage-4-tp18842.html
Sent from the playerstage-developers mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Playerstage-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: laser with stage 4

light86
dear thank you
please in player is there also a change?
could you write a tutorial
Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: laser with stage 4

irobo
Hii light86,

Here is the simple to test laser in stage 4.1.1 with .cc,.world and .cfg files. May be it will help u. While runnning .cc file, change the position of robo with the mouse and see the change in laser readings. The other functions to access laser can be found from the below link:

http://playerstage.sourceforge.net/doc/Player-svn/player/classPlayerCc_1_1RangerProxy.html

*****************************************************************************
empty.cfg::
------------------
driver
(
name "stage"
plugin "stageplugin"
provides ["simulation:0"]
# load the named file into the simulator
worldfile "empty.world"
)


driver
(
name "stage"
provides ["6665:position2d:0" "6665:ranger:0" "6665:ranger:1"]
model "r0"
)

driver
(
  name "rangertolaser"
  provides [ "laser:0" ]
  requires [ "ranger:1" ]
)
*************************************************************************
empty.world::
-------------------

include "map.inc"
include "pioneer.inc"
include "sick.inc"

resolution 0.02

floorplan
(
bitmap "cave.png"
size [25 17 1]
)

window
(
size [700.000 700.000]
scale 20
show_data 1
)

pioneer2dx
(  
  # can refer to the robot by this name
  name "r0"
  pose [-4 6 0 -90]

  # pioneer2dx's sonars will be ranger:0 and the laser will be ranger:1
  sicklaser( pose [ 0 0 0 0 ] )
 
  # demonstrate a plugin controller, implemented in examples/ctrl/wander.cc
  # you probably should comment this out when using simple.cfg with Player
  #ctrl "wander"

  # report error-free position in world coordinates
  localization "gps"
  localization_origin [ 0 0 0 0 ]
)

*****************************************************************************
test.cc::
-----------
#include <stdio.h>
#include <libplayerc++/playerc++.h>
#include<time.h>
#include<unistd.h>
#include<iostream>

using namespace PlayerCc;
using namespace std;

int main(int argc, char *argv[])
{
        PlayerClient robot("localhost");
        Position2dProxy p2dProxy(&robot,0);
        RangerProxy sonarProxy(&robot,0);
        RangerProxy laserProxy(&robot,1);  
        p2dProxy.SetMotorEnable(1);
        p2dProxy.RequestGeom();
        laserProxy.RequestGeom();
        sonarProxy.RequestGeom();
       
        double forwardSpeed, turnSpeed;
        uint32_t count;
        player_pose3d_t pose;
        double range;
        srand(time(NULL));
       
        //some control code
        robot.Read();
        //laserProxy.RequestConfigure();
        while(true)
        {
                // read from the proxies
                robot.Read();
                cout << laserProxy << std::endl;
                sleep(1);
        }

        return 0;
}
******************************************************************************


Best Regards.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: laser with stage 4

light86
Thank you
Loading...