Giter VIP home page Giter VIP logo

stage's Introduction

The Stage Simulator

This is the Stage README file, containing an introduction, license and citation information. Stage is a 2(.5)D robotics standalone simulator and can also be used as a C++ library to build your own simulation environment. Up-to-date documentation can be found here.

For release notes see RELEASE.txt For installation notes see INSTALL.txt

Copyright Richard Vaughan and contributors 1998-2011 Part of the Player Project (http://playerstage.org)

Build Status

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the license is included with the sourcecode in the file 'COPYING". Copying and redistribution is permitted only under the terms of the license.

Introduction

Stage is a robot simulator. It provides a virtual world populated by mobile robots and sensors, along with various objects for the robots to sense and manipulate.

There are three ways to use Stage:

  1. The "stage" program: a standalone robot simulation program that loads your robot control program from a library that you provide.
  2. The Stage plugin for Player (libstageplugin) - provides a population of virtual robots for the popular Player networked robot interface system.
  3. Write your own simulator: the "libstage" C++ library makes it easy to create, run and customize a Stage simulation from inside your own programs.

Models

Stage provides several sensor and actuator models, including sonar or infrared rangers, scanning laser rangefinder, color-blob tracking, fiducial tracking, bumpers, grippers and mobile robot bases with odometric or global localization.

Design

Stage was designed with multi-agent systems in mind, so it provides fairly simple, computationally cheap models of lots of devices rather than attempting to emulate any device with great fidelity. This design is intended to be useful compromise between conventional high-fidelity robot simulations, the minimal simulations described by Jakobi [4], and the grid-world simulations common in artificial life research [5]. We intend Stage to be just realistic enough to enable users to move controllers between Stage robots and real robots, while still being fast enough to simulate large populations. We also intend Stage to be comprehensible to undergraduate students, yet sophisticated enough for professional reseachers.

Player also contains several useful 'virtual devices'; including some sensor pre-processing or sensor-integration algorithms that help you to rapidly build powerful robot controllers. These are easy to use with Stage.

Citations

If you use Stage in your work, we'd appreciate a citation. At the time of writing, the most suitable reference is either:

  • Richard Vaughan. "Massively Multiple Robot Simulations in Stage", Swarm Intelligence 2(2-4):189-208, 2008. Springer, download PDF

Or, if you are using Player/Stage:

  • Brian Gerkey, Richard T. Vaughan and Andrew Howard. "The Player/Stage Project: Tools for Multi-Robot and Distributed Sensor Systems" Proceedings of the 11th International Conference on Advanced Robotics, pages 317-323, Coimbra, Portugal, June 2003 (ICAR'03), download PDF

Please help us keep track of what's being used out there by correctly naming the Player/Stage components you use. Player used on its own is called "Player". Player and Stage used together are referred to as "the Player/Stage system" or just "Player/Stage". When Stage is used without Player, it's just called "Stage". When the Stage library is used to create your own custom simulator, it's called "libstage" or "the Stage library". When Player is used with its 3D ODE-based simulation backend, Gazebo, it's called Player/Gazebo. Gazebo without Player is just "Gazebo". All this software is part of the "Player Project".

Support

Funding for Stage has been provided in part by:

  • DARPA (USA)
  • NASA (USA)
  • NSERC (Canada)
  • DRDC Suffield (Canada)
  • NSF (USA)
  • Simon Fraser University (Canada)

Names

The names "Player" and "Stage" were inspired by the lines:

All the world's a stage,
And all the men and women merely players

from "As You Like It" by William Shakespeare.

References

[4] Nick Jakobi (1997) "Evolutionary Robotics and the Radical Envelope of Noise Hypothesis", Adaptive Behavior Volume 6, Issue 2. pp.325 - 368.

[5] Stuart Wilson (1985) "Knowledge Growth in an Artificial Animal", Proceedings of the First International Conference on Genetic Agorithms and Their Applications. Hillsdale, New Jersey. pp.16-23.

stage's People

Contributors

4eetah avatar chmp avatar codefinder2 avatar corot avatar dkargin avatar doisyg avatar gbiggs avatar kartikmohta avatar mani-monaj avatar marjinal1st avatar rezzie avatar richmattes avatar rtv avatar wjwwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stage's Issues

Package version ":{version}" does not follow version conventions

I tried to use this package on ROS-Kinetic under Ubuntu 16.04. After cloning it, when I tried to catkin_make it, I got the following error.

Package version ":{version}" does not follow version conventions

When I tried to remove all the other folders in my work space which were of Hydro, Indigo and Jade etc. still I got the same error. Please, help. How can I solve it?

move robot backwards

Hi,

I am modelling a robot that moves backwards using Goto function, however, it does not seem to do it.
It always turn the robot toward the goal (with an angular move of 180o) and then it moves forwards.

Any suggestion of how to perform this movement ?
Currently I am using the following code, but the error in the final position is quite large.
I think there should be a better way to do it ....

best regards,

int DonnieClient::moveBackward(float arg)
{
	vector<float> path;

	robot->Read();
	double yaw = p2dProxy->GetYaw();    //Angulo do robo
	double posxi = p2dProxy->GetXPos();   //Posicao inicial X do robo
	double posyi = p2dProxy->GetYPos();   //Posicao inicial Y do robo

	PathNodes Point;

	for(int i = 1; i <= (int)arg; i++)
	{

	  path.push_back(i*STEP_LENGHT);
	}

	float fltPart = arg - (int)arg;

	if(fltPart > 0)
	{
	  path.push_back(fltPart);
	}

	float Npassos = arg;
	int passos = 0;

	bool obstacle = false;
	bool stop = true;
	float erro;
	float andou;

	if(sonarProxy->GetRange(4) > 0.2)
	{
	  stop = false;
	  p2dProxy->SetSpeed(-0.05,0);
	}

	while(!stop)
	{
	  if(passos > Npassos )
	  {
	    p2dProxy->SetSpeed(0,0);
	    break;
	  }

	  robot->ReadIfWaiting();
	  if(this->BackBumper() != 0 or sonarProxy->GetRange(4) < BACK_RANGER or sonarProxy->GetRange(3) < SIDE_RANGER or sonarProxy->GetRange(5) < SIDE_RANGER)
	  {
	    p2dProxy->SetSpeed(0,0);
	    stop = true;
	    andou = hypotf(p2dProxy->GetXPos() - posxi, p2dProxy->GetYPos() - posyi);
	    erro = andou - (int)andou;
	    break;
	  }
	    
	  robot->ReadIfWaiting();
	  if(sonarProxy->GetRange(4) < 0.2 and !obstacle) // For donnie, do not work in stage.
	  {
	    Npassos = passos;
	    obstacle = true;
	  }

	  robot->ReadIfWaiting();
	  if(hypotf(p2dProxy->GetXPos() - posxi, p2dProxy->GetYPos() - posyi) > path[passos])
	  {
	  		passos++;
	  }
	    
	path.clear();
	
	#ifndef NDEBUG
	cout << "Andou: " << passos << ", parou: " << stop << ", erro: " << erro << ", obstaculo: " << obstacle << endl;
	#endif

	// number of steps actually taken
	return passos;	
}

Adding cameras to stageros

Willow Garage is migrating code repository & issue tracker to github and I haven't found any other location for Stage than here. If it's not a right space for ROS binding please say so. Thank you.


Migrated from https://code.ros.org/trac/ros/ticket/4058
Reported by: trinighost Owned by: gerkey
Priority: major
Last modified: Nov 2012


Description
There are a couple of things that I wish I had more time to address, these include using the image_transport, and addressing the matter of whether a camera can exist with out a host model, but here's a patch that provides the missing functionality.


Content of camera_rev.patch

TabularUnified src/stageros.cpp

    42  42  #include <boost/thread/mutex.hpp> 
    43  43  #include <boost/thread/thread.hpp> 
    44  44  #include <sensor_msgs/LaserScan.h> 
        45  #include <sensor_msgs/Image.h> 
    45  46  #include <nav_msgs/Odometry.h> 
    46  47  #include <geometry_msgs/Twist.h> 
    47  48  #include <rosgraph_msgs/Clock.h> 
    …     …      
    49  50  #include "tf/transform_broadcaster.h" 
    50  51   
    51  52  #define USAGE "stageros <worldfile>" 
        53  #define IMAGE "image" 
    52  54  #define ODOM "odom" 
    53  55  #define BASE_SCAN "base_scan" 
    54  56  #define BASE_POSE_GROUND_TRUTH "base_pose_ground_truth" 
    …     …      
    59  61  { 
    60  62    private: 
    61  63      // Messages that we'll send or receive 
        64      sensor_msgs::Image *imageMsgs; 
    62  65      sensor_msgs::LaserScan *laserMsgs; 
    63  66      nav_msgs::Odometry *odomMsgs; 
    64  67      nav_msgs::Odometry *groundTruthMsgs; 
    …     …      
    71  74      boost::mutex msg_lock; 
    72  75   
    73  76      // The models that we're interested in 
        77      std::vector<Stg::ModelCamera *> cameramodels; 
    74  78      std::vector<Stg::ModelRanger *> lasermodels; 
    75  79      std::vector<Stg::ModelPosition *> positionmodels; 
        80      std::vector<ros::Publisher> image_pubs_; 
    76  81      std::vector<ros::Publisher> laser_pubs_; 
    77  82      std::vector<ros::Publisher> odom_pubs_; 
    78  83      std::vector<ros::Publisher> ground_truth_pubs_; 
    …     …      
    150 155     node->lasermodels.push_back(dynamic_cast<Stg::ModelRanger *>(mod)); 
    151 156   if (dynamic_cast<Stg::ModelPosition *>(mod)) 
    152 157     node->positionmodels.push_back(dynamic_cast<Stg::ModelPosition *>(mod)); 
        158   if (dynamic_cast<Stg::ModelCamera *>(mod)) 
        159     node->cameramodels.push_back(dynamic_cast<Stg::ModelCamera *>(mod)); 
    153 160 } 
    154 161  
    155 162 void 
    …     …      
    186 193   Stg::Init( &argc, &argv ); 
    187 194  
    188 195   if(gui) 
    189         this->world = new Stg::WorldGui(800, 700, "Stage (ROS)"); 
        196     this->world = new Stg::WorldGui(400, 300, "Stage (ROS)"); 
    190 197   else 
    191 198     this->world = new Stg::World(); 
    192 199  
    …     …      
    207 214               "the world file."); 
    208 215     ROS_BREAK(); 
    209 216   } 
        217   else if (cameramodels.size() > 0 && cameramodels.size() != positionmodels.size()) 
        218   { 
        219     ROS_FATAL("number of position models and camera models must be equal in " 
        220               "the world file."); 
        221     ROS_BREAK(); 
        222   } 
        223  
    210 224   size_t numRobots = positionmodels.size(); 
    211       ROS_INFO("found %u position/laser pair%s in the file",  
        225   ROS_INFO("found %u set%s of position/laser/camera in the file",  
    212 226            (unsigned int)numRobots, (numRobots==1) ? "" : "s"); 
    213 227  
    214 228   this->laserMsgs = new sensor_msgs::LaserScan[numRobots]; 
    215 229   this->odomMsgs = new nav_msgs::Odometry[numRobots]; 
    216 230   this->groundTruthMsgs = new nav_msgs::Odometry[numRobots]; 
        231   this->imageMsgs = new sensor_msgs::Image[numRobots]; 
    217 232 } 
    218 233  
    219 234  
    …     …      
    248 263       ROS_ERROR("no position"); 
    249 264       return(-1); 
    250 265     } 
        266     if(this->cameramodels[r]) 
        267     { 
        268       this->cameramodels[r]->Subscribe(); 
        269     } 
        270     else 
        271     { 
        272       ROS_ERROR("no camera"); 
        273       return(-1); 
        274     } 
    251 275     laser_pubs_.push_back(n_.advertise<sensor_msgs::LaserScan>(mapName(BASE_SCAN,r), 10)); 
    252 276     odom_pubs_.push_back(n_.advertise<nav_msgs::Odometry>(mapName(ODOM,r), 10)); 
    253 277     ground_truth_pubs_.push_back(n_.advertise<nav_msgs::Odometry>(mapName(BASE_POSE_GROUND_TRUTH,r), 10)); 
        278     image_pubs_.push_back(n_.advertise<sensor_msgs::Image>(mapName(IMAGE,r), 10)); 
    254 279     cmdvel_subs_.push_back(n_.subscribe<geometry_msgs::Twist>(mapName(CMD_VEL,r), 10, boost::bind(&StageNode::cmdvelReceived, this, r, _1))); 
    255 280   } 
    256 281   clock_pub_ = n_.advertise<rosgraph_msgs::Clock>("/clock",10); 
    …     …      
    262 287   delete[] laserMsgs; 
    263 288   delete[] odomMsgs; 
    264 289   delete[] groundTruthMsgs; 
        290   delete[] imageMsgs; 
    265 291 } 
    266 292  
    267 293 bool 
    …     …      
    345 371                                           mapName("base_footprint", r), 
    346 372                                           mapName("base_link", r))); 
    347 373  
        374     // Get latest image data 
        375     // Translate into ROS message format and publish 
        376     if (this->cameramodels[r]->FrameColor()) { 
        377        this->imageMsgs[r].height=this->cameramodels[r]->getHeight(); 
        378        this->imageMsgs[r].width=this->cameramodels[r]->getWidth(); 
        379        this->imageMsgs[r].encoding="rgba8"; 
        380        //this->imageMsgs[r].is_bigendian=""; 
        381        this->imageMsgs[r].step=this->imageMsgs[r].width*4; 
        382        this->imageMsgs[r].data.resize(this->imageMsgs[r].width*this->imageMsgs[r].height*4); 
        383  
        384        memcpy(&(this->imageMsgs[r].data[0]),this->cameramodels[r]->FrameColor(),this->imageMsgs[r].width*this->imageMsgs[r].height*4); 
        385  
        386        //invert the opengl weirdness 
        387        int height = this->imageMsgs[r].height - 1; 
        388        int linewidth = this->imageMsgs[r].width*4; 
        389  
        390        char* temp = new char[linewidth]; 
        391        for (int y = 0; y < (height+1)/2; y++)  
        392        { 
        393             memcpy(temp,&this->imageMsgs[r].data[y*linewidth],linewidth); 
        394             memcpy(&(this->imageMsgs[r].data[y*linewidth]),&(this->imageMsgs[r].data[(height-y)*linewidth]),linewidth); 
        395             memcpy(&(this->imageMsgs[r].data[(height-y)*linewidth]),temp,linewidth); 
        396        } 
        397  
        398         this->imageMsgs[r].header.frame_id = mapName("image", r); 
        399         this->imageMsgs[r].header.stamp = sim_time; 
        400  
        401         this->image_pubs_[r].publish(this->imageMsgs[r]); 
        402     } 
        403  
    348 404     // Get latest odometry data 
    349 405     // Translate into ROS message format and publish 
    350 406     this->odomMsgs[r].pose.pose.position.x = this->positionmodels[r]->est_pose.x; 

TabularUnified world/willow-four-erratics.world

    4   4     gui_nose 0 
    5   5   ) 
    6   6    
    7       define topurg laser 
        7   define topurg ranger 
    8   8   ( 
        9     sensor(  
        10      range [ 0.0  30.0 ] 
        11      fov 270.25 
        12      samples 1081 
        13    ) 
    9   14   
    10        range_max 30.0 
    11        fov 270.25 
    12        samples 1081 
    13  15    # generic model properties 
    14  16    color "black" 
    15  17    size [ 0.05 0.05 0.1 ] 
    …     …      
    23  25    gui_nose 1 
    24  26    drive "diff" 
    25  27    topurg(pose [ 0.050 0.000 0 0.000 ]) 
        28   
        29    camera 
        30    ( 
        31      # laser properties 
        32      resolution [ 300 400 ] 
        33      range [ 0.2 8.0 ] 
        34      fov [ 70.0 40.0 ] 
        35      pantilt [ 0.0 0.0 ] 
        36   
        37      # model properties 
        38      size [ 0.1 0.07 0.05 ] 
        39      color "black" 
        40      watts 100.0 # TODO find watts for sony pan-tilt camera 
        41    ) 
    26  42  ) 
    27  43   
    28  44  define floorplan model 
    TabularUnified world/willow-erratic.world

        1    
    1   2   define block model 
    2   3   ( 
    3   4     size [0.5 0.5 0.5] 
    …     …      
    25  26    gui_nose 1 
    26  27    drive "diff" 
    27  28    topurg(pose [ 0.050 0.000 0 0.000 ]) 
        29   
        30    camera 
        31    ( 
        32      # laser properties 
        33      resolution [ 32 32 ] 
        34      range [ 0.2 8.0 ] 
        35      fov [ 70.0 40.0 ] 
        36      pantilt [ 0.0 0.0 ] 
        37   
        38      # model properties 
        39      size [ 0.1 0.07 0.05 ] 
        40      color "black" 
        41      watts 100.0 # TODO find watts for sony pan-tilt camera 
        42    ) 
        43   
    28  44  ) 
    29  45   
    30  46  define floorplan model 

Issues on the SourceForge tracker

I was doing some bug triage on the playerstage sourceforge issue tracker, and noted that there are quite a few issues and patches for Stage still there. Do you intend to go through them yourself and make sure there's nothing there you're missing? Or would you like them to all be closed with a pointer to re-submit at this tracker?

cmake finds playercore, but then make yields "cannot find -lplayercore"

Firstly I grabbed the latest player from SVN:

$ svn info 
URL: https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk
Last Changed Date: 2012-01-04 22:18:25 +0000 (Wed, 04 Jan 2012)

I did mkdir build, cd build, cmake ../, make, sudo checkinstall, and player appeared to install co
rrectly:

$ player
Player v.3.1.0-svn

Next I pulled the latest stage from https://github.com/rtv/Stage.git.

I apply some fixes which have a pending pull request: curl https://github.com/rtv/Stage/pull/19.patch | git am

Then I cmake . and see:

- checking for one of the modules 'playercore>=2.1.0'
--   found playercore, version 3.1.0-svn
--   * Player version 3.1.0-svn detected at /usr/local
--     PLAYER_CFLAGS: -I/usr/local/include/player-3.1
--     PLAYER_LDFLAGS: -L/usr/local/lib;-lplayercore;-lpthread;-lltdl;-ldl;-lplayerinterface;-lplayercommon

However, make then fails with:

Linking CXX shared module stageplugin.so
/usr/bin/ld: cannot find -lplayercore
collect2: ld returned 1 exit status
make[2]: *** [libstageplugin/stageplugin.so] Error 1
make[1]: *** [libstageplugin/CMakeFiles/stageplugin.dir/all] Error 2
make: *** [all] Error 2

To resolve this issue I had to create the necessary symlinks by hand:

$ sudo ln -s /usr/local/lib/libplayercore.so.3.1 libplayercore.so
$ sudo ln -s /usr/local/lib/libplayerinterface.so.3.1 libplayerinterface.so
$ sudo ln -s /usr/local/lib/libplayercommon.so.3.1 libplayercommon.so

After doing this I can make successfully.

I assume this is due to a problem with ldconfig, but I thought I'd mention it here before investigating further.
I'm using Ubuntu 10.04 and the only other noticeable difference is that I'm using checkinstall instead of make install.

GPS Localization Introduces Error

Starting at line 521 of model_position.cc, the global position is transformed to be relative to the origin and then used as the estimated position. This transformation process introduces noticeable error.

An easy way to see this is to run a simulated erratic through a map with solid, straight lines (i.e. manually drawn). In rviz, turn up the laser scanner decay time. If the odometry were perfect, you would see a perfect copy of the map drawn in rviz. However, you'll notice lots of errors instead.

As a quick fix for my situation, I simply removed the additional transformation and used the global pose directly. This results in an offset from the origin but no inaccuracies.

p_blobfinder.cc not working well, patch attached

Hi,

I have found a bug in blobfinder interface when using Player. No blobs are found or marked in player clients (for example playerv) but in Stage the blobs are correctly shown. I made some changes on p_blobfinder.cc, hope they are fine, they worked for me. I am using last versions of Stage: 4.1.1-8.

Below you can find the changes applied using diff:

--- /home/alejo/Software/compilaciones/Stage-4.1.1-8/libstageplugin/p_blobfinder.cc 2012-01-16 16:28:12.000000000 -0500
+++ /home/alejo/Software/compilaciones/Stage-4.1.1/libstageplugin/p_blobfinder.cc 2012-01-20 19:12:56.031144179 -0500
@@ -55,9 +55,12 @@

ModelBlobfinder* blobmod = (ModelBlobfinder*)this->mod;

'- uint32_t bcount = 0;

const ModelBlobfinder::Blob* blobs = &blobmod->GetBlobs()[0];

'+ const std::vectorStg::ModelBlobfinder::Blob* blbCount = &blobmod->GetBlobs();
'+ uint32_t bcount = blbCount->size();
'+
if ( bcount > 0 )
{
// and set the image width * height

area computation in p_blobfinder

In p_blobfinder.cc:102, area (a uint32) is set to dx*dy.
But dy = blobs[b].top - blobs[b].bottom (a negative number in my case at least).
So area is set to a negative number.

With an (int) cast in the calling program, I get the "correct" negative area back, so I think that the data are passed correctly.

Not sure what the best way to fix this would be - to redefine dy as bottom-top, to add an abs() to dy? Is top ever > bottom?

"invalid suffix on literal" Warnings C++11

When using C++11, I get a lot of warnings of the type "warning: invalid suffix on literal; C++11 requires a space between literal and identifier".
These are caused by the PRINT_* macros in stage.hh beginning in line 650 up to line 689.
The macros all look like this:

#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__)

The message m should be seperated by a blank space from the surrounding strings. C++11 has special syntax for characters immediately following a string literal, so these may be interpreted differently.
In my case I altered the stage.hh, so all m are seperated by a blank space from the strings and it works just fine (as expected).
This should probably be changed in the master as this is not much work and in the future more people will use C++11.

Disabling GUI while using stageplugin

Hi,
I don't know if it is possible or not, but I would like to know if there's a way to run a simulation with player+stageplugin with GUI disabled (ie: run a simulation without gui).

Thank you!

Odometry estimation issue

Can't understand the meaning of the '-=' in line 556 of file libstage/model_position.cc. What is happening with me, on an omnidirectional robot, is that, with pose.a=0, a positive vel.y will imply a decreasing pose.y, which does not seem to make sense. Can anyone clarify this?

Accessing the list of blocks

Hi. I'm trying to access the set of obstacles and their absolute coordinates on the map as displayed by Stage. I've been browsing the Stage manual and from what I understand, the obstacles are Blocks that are being stored in a Model variable. I used "(*world).GetGround()" to get a model of the ground. Is that the model I need to access the obstacles/blocks?

Moreover, how can I get a list of all Blocks on the Model from that point on? The Block class info states that a Model body is a list of Blocks, but I can't even find a getter method in the Model class! The only function I found that could be helpful is Rasterize, but that requires the Model size and resolution. I don't even know where to get these. Any help would be appreciated. Thanks!

Failed to load plugin stageplugin

Hi,
I have installed Player 3.1 svn and last master Stage 4.0.1 and, even if the installation of both is ok when I launch Stage I get this error message
error : Failed to load plugin stageplugin.
error : libtool reports error: file not found
error : plugin search path: /usr/local/lib:/usr/local/include/player-3.1:/home/vale/stage:.:/usr/local/lib/
error : failed to load plugin: stageplugin

With older version of STAGE 4.0.1 (for example master 17a3632) the problem doesn't exist

The SimulatingOneRobot tutorial is several years out of date

Problems using Gripper Model

Hi,

I have found another problem in last version of Stage, regarding gripper interface. First of all, I am using Player to control Stage. The gripper is correctly displayed the first time Stage is launched, but when it is closing or opening, it gets all creepy. In Stage 4.1.1-0 it worked fine, but due to some changes in 4.1.1-8 (I think it has something to do with Blockgroup, but I am just guessing), it is behaving that way. Hope this can be fixed soon ;).

Regards,

Segfault in libGLU.so related to Blocks

I'm seeing a reproducible segfault in libGLU.so when loading a world file in which a position model has a block. Removing the block prevents the crash, as does running stage without graphics enabled.

The example world file is at: https://kforge.ros.org/navigation/tutorials/file/d1f3dda4fd5a/roomba_stage/roomba_lse_arena.world

Starting program: /opt/ros/fuerte/stacks/stage/bin/stageros /home/ros/fuerte_workspace/navigation_tutorials/roomba_stage/roomba_lse_arena.world
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0x42720b40 (LWP 7706)]
[New Thread 0x42921b40 (LWP 7707)]
[New Thread 0x42d00b40 (LWP 7708)]
[New Thread 0x43200b40 (LWP 7715)]
[New Thread 0x4516db40 (LWP 7719)]
[Loading /home/ros/fuerte_workspace/navigation_tutorials/roomba_stage/roomba_lse_arena.world][New Thread 0x45bcab40 (LWP 7720)]
[Image "./maps/lse_arena.pgm"]
warn: worldfile /home/ros/fuerte_workspace/navigation_tutorials/roomba_stage/roomba_lse_arena.world:22 : property [laser_return] is defined but not used (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/worldfile.cc WarnUnused)
warn: worldfile /home/ros/fuerte_workspace/navigation_tutorials/roomba_stage/roomba_lse_arena.world:32 : property [color] is defined but not used (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/worldfile.cc WarnUnused)
warn: worldfile /home/ros/fuerte_workspace/navigation_tutorials/roomba_stage/roomba_lse_arena.world:8 : property [range_max] is defined but not used (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/worldfile.cc WarnUnused)
warn: worldfile /home/ros/fuerte_workspace/navigation_tutorials/roomba_stage/roomba_lse_arena.world:7 : property [range_min] is defined but not used (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/worldfile.cc WarnUnused)
[ INFO] [1350446716.598520044]: found 1 position/laser pair in the file
[New Thread 0x45dcbb40 (LWP 7727)]

Program received signal SIGSEGV, Segmentation fault.
0x4097c793 in __gl_pqSortInit (pq=0x843f9f8) at libtess/priorityq.c:132
132 j = r + 1;
(gdb) bt
#0 0x4097c793 in __gl_pqSortInit (pq=0x843f9f8) at libtess/priorityq.c:132
#1 0x4097fb2e in InitPriorityQ (tess=< optimized out>) at libtess/sweep.c:1251
#2 __gl_computeInterior (tess=0x8666078) at libtess/sweep.c:1321
#3 0x40980900 in gluTessEndPolygon (tess=0x8666078) at libtess/tess.c:540
#4 0x40273d55 in Stg::BlockGroup::BuildDisplayList (this=0x864a6d4) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/blockgroup.cc:243
#5 0x40274155 in Stg::BlockGroup::CallDisplayList (this=0x864a6d4) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/blockgroup.cc:288
#6 0x4028857e in Stg::Model::DrawBlocks (this=0x864a678) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/model_draw.cc:253
#7 0x402889b2 in Stg::Model::DrawBlocksTree (this=0x864a678) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/model_draw.cc:235
#8 0x402adc73 in Stg::Canvas::DrawBlocks (this=0x80bbfd0) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/canvas.cc:717
#9 0x402b5950 in Stg::Canvas::renderFrame (this=0x80bbfd0) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/canvas.cc:954
#10 0x402ad7e1 in Stg::Canvas::draw (this=0x80bbfd0) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/canvas.cc:1321
#11 0x40a74197 in Fl_Gl_Window::flush() () from /usr/lib/i386-linux-gnu/libfltk_gl.so.1.1
#12 0x405e6ee3 in Fl::flush() () from /usr/lib/i386-linux-gnu/libfltk.so.1.1
#13 0x405e8645 in Fl::wait(double) () from /usr/lib/i386-linux-gnu/libfltk.so.1.1
#14 0x08059209 in main (argc=2, argv=0xbffff004) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/src/stageros.cpp:445

(gdb) info locals
p = 0x8666f20
r = 0x8666f5c
i = 0x8666f5c
j = 0x8666f60
piv = 0x8666eb8
Stack = {{p = 0x8666f20, r = 0x8666f5c}, {p = 0xbfffe6b8, r = 0x404912c1}, {p = 0x866f600, r = 0x43337ff4}, {p = 0x41018899, r = 0x404912c1}, {p = 0x82e3de0, r = 0xb}, {p = 0x80cdd50, r = 0x404912c1}, {
p = 0x268, r = 0x2710}, {p = 0x48, r = 0x405c0470}, {p = 0x405c0478, r = 0x9}, {p = 0x40, r = 0x9}, {p = 0x3d8, r = 0x2710}, {p = 0x40, r = 0x405c0470}, {p = 0x405c0478, r = 0x0}, {p = 0x3c, r = 0x8}, {
p = 0x1, r = 0x50}, {p = 0x0, r = 0x404912c1}, {p = 0x0, r = 0x0}, {p = 0x8, r = 0x39}, {p = 0x5b, r = 0x6e}, {p = 0x77, r = 0x404912c1}, {p = 0x0, r = 0x30}, {p = 0x0, r = 0x405bfff4}, {p = 0x0,
r = 0x2710}, {p = 0x110, r = 0x405c0470}, {p = 0x5b, r = 0x6e}, {p = 0x108, r = 0x22}, {p = 0x4, r = 0x2710}, {p = 0x88, r = 0x405c0470}, {p = 0x0, r = 0x0}, {p = 0x80, r = 0x11}, {p = 0x2, r = 0x98}, {
p = 0x0, r = 0x0}, {p = 0x0, r = 0x0}, {p = 0x11, r = 0x3a}, {p = 0x5b, r = 0x6e}, {p = 0x77, r = 0x7c}, {p = 0x8660000, r = 0x86654c0}, {p = 0x0, r = 0x405bfff4}, {p = 0x405c0440, r = 0x4097a520}, {
p = 0x80, r = 0x40493fec}, {p = 0x0, r = 0x0}, {p = 0x0, r = 0x409d0ff4}, {p = 0x86652c0, r = 0x8666d00}, {p = 0x866f484, r = 0x4097c20a}, {p = 0x108, r = 0x3ff00000}, {p = 0x0, r = 0x4097c993}, {
p = 0x843f9f8, r = 0x4097a520}, {p = 0x86652c0, r = 0x4097c5a0}, {p = 0x80, r = 0x3fc51eb8}, {p = 0x2e5096af, r = 0xdf238d35}}
top = < optimized out>
seed = 1409832680
(gdb) up
#1 0x4097fb2e in InitPriorityQ (tess=< optimized out>) at libtess/sweep.c:1251

1251 if (v != vHead || !pqInit( pq ) ) { /* __gl_pqSortInit */
(gdb) info locals
pq = 0x843f9f8
v = 0x866f430
vHead = 0x866f430
(gdb) up
#2 __gl_computeInterior (tess=0x8666078) at libtess/sweep.c:1321

1321 if ( !InitPriorityQ( tess ) ) return 0; /* if error */
(gdb) info locals
v = < optimized out>
vNext = < optimized out>
(gdb) up
#3 0x40980900 in gluTessEndPolygon (tess=0x8666078) at libtess/tess.c:540

540 if ( !__gl_computeInterior( tess ) ) {
(gdb) info locals
mesh = < optimized out>
(gdb) up
#4 0x40273d55 in Stg::BlockGroup::BuildDisplayList (this=0x864a6d4) at /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/blockgroup.cc:243

243 /tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/blockgroup.cc: No such file or directory.
(gdb) info locals
tobj = 0x8666078
geom = {pose = {_vptr.Pose = 0x8071dd8, x = 0, y = 0, z = 0, a = 0}, size = {x = 0.33000000000000002, y = 0.33000000000000002, z = 0.10000000000000001}}
contours = {< std::_Vector_base< std::vector< double, std::allocator< double> >, std::allocator< std::vector< double, std::allocator< double> > > >> = {
_M_impl = {< std::allocator< std::vector< double, std::allocator< double> > >> = {< __gnu_cxx::new_allocator< std::vector< double, std::allocator< double> > >> = {< No data fields>}, < No data fields>},
_M_start = 0x866aee8, _M_finish = 0x866aef4, _M_end_of_storage = 0x866aef4}}, < No data fields>}
c = < optimized out>

Ranger representation not showing

Hello.

I'm running simple.cfg. It works correctly but for some reason I cannot see the representation of the ranger on the Player window.
The ranger is working Ok, because the robot avoids the obstacles. It just isnt showing.

Thanks a lot for all the great work that has gone into these tools.

Best regards.

LTDL_INCLUDE_DIR Cmake error during configure

-- Stage version 4.1.1
-- Operating system is Linux
-- Linux x86_64 Detected
-- Installing Libraries to /home/rashad/opt/lib64
-- Installing Plugins to /home/rashad/opt/lib64/Stage-4.1
-- Build type RELEASE
-- Checking for libtool
-- Checking for required libraries...
-- Checking for optional libraries...
-- checking for one of the modules 'playercore>=2.1.0'
-- * Player not detected. If Player is installed but not detected, check your PKG_CONFIG_PATH.
-- Installation path CMAKE_INSTALL_PREFIX=/home/rashad/opt
-- Configuring libstage
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LTDL_INCLUDE_DIR
used as include directory in directory /home/rashad/sources/playerstage/github_Stage
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/libstage
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/libstage
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/examples/ctrl
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/worlds/benchmark
used as include directory in directory /home/rashad/sources/playerstage/github_Stage/worlds/benchmark
LTDL_LIB
linked by target "stage" in directory /home/rashad/sources/playerstage/github_Stage/libstage

-- Configuring incomplete, errors occurred!
See also "/home/rashad/build/stage/CMakeFiles/CMakeOutput.log".

Simulation data is not shown

Hello,

I'm using Stage with ROS Jade on Arch Linux (up-to-date). Version is:

$ stage
Stage 4.1.1 

[Stage: done]

When I run any Stage simulation, for example simple.world example, no simulation data is shown in the screen (View -> Data is selected). Also there's no time information in the left-bottom and none of axes is shown:

stage-ss

glxinfo output: https://gist.github.com/marjinal1st/64f1a055810969eb728d

Any ideas?

InterfaceModel::Subscribe(QueuePointer&) undefined

In libstageplugin/p_driver.h, the following functions are declared as part of the InterfaceModel class:

InterfaceModel::Subscribe(QueuePointer&)  
InterfaceModel::Unsubscribe(QueuePointer&) 

However, no definition exists for these calls in either p_driver.h or p_driver.cpp. This causes a build failure in newer Linux distributions.

If these methods are really meant to override the base class and do nothing, then they should be given an empty definition. Otherwise, the declarations should probably be removed.

Stage should take world size from the map size

[Apologies if this has already been fixed. It was reported ages ago in the ROS world: https://code.ros.org/trac/ros-pkg/ticket/4133 and has recently come up on the users' list: http://sourceforge.net/mailarchive/forum.php?thread_name=CALpJrX6DDFUfYHwOF_MqNtfdShAeh2s78wJw-fG5W3%2BoWAVN0Q%40mail.gmail.com&forum_name=playerstage-users]

Stage trims white space from bitmaps, which has non-intuitive results, including changing the size and aspect ratio of the world. The declared world size should be applied to the actual size of the bitmap, irrespective of surrounding white space.

new c++11 string literal breaks macrodefenitions in stage.hh

get error when compiling:

In file included from src/stageros.cpp:38:0:
/opt/ros/indigo/lib/cmake/Stage/../../../include/Stage-4.1/stage.hh: In member function ‘virtual void Stg::Ancestor::SetToken(const string&)’:
/opt/ros/indigo/lib/cmake/Stage/../../../include/Stage-4.1/stage.hh:625:62: error: unable to find string literal operator ‘operator""m’ with ‘const char [24]’, ‘long unsigned int’ arguments
#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", FILE, FUNCTION)
^
/opt/ros/indigo/lib/cmake/Stage/../../../include/Stage-4.1/stage.hh:725:2: note: in expansion of macro ‘PRINT_ERR’
PRINT_ERR( "Ancestor::SetToken() called with zero length string. Ignored." );
^~~~~~~~~
/opt/ros/indigo/lib/cmake/Stage/../../../include/Stage-4.1/stage.hh: In member function ‘virtual void Stg::Model::SetToken(const string&)’:
/opt/ros/indigo/lib/cmake/Stage/../../../include/Stage-4.1/stage.hh:625:62: error: unable to find string literal operator ‘operator""m’ with ‘const char [24]’, ‘long unsigned int’ arguments
#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", FILE, FUNCTION)
^
/opt/ros/indigo/lib/cmake/Stage/../../../include/Stage-4.1/stage.hh:2032:2: note: in expansion of macro ‘PRINT_ERR’
PRINT_ERR( "Model::SetToken() called with zero length string. Ignored." );
^~~~~~~~~
make[2]: *** [CMakeFiles/stageros.dir/build.make:63: CMakeFiles/stageros.dir/src/stageros.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:805: CMakeFiles/stageros.dir/all] Error 2
make: *** [Makefile:128: all] Error 2

the problem is that in c++11 new string literals could be defined (e.g. operator ""m) thus the macrodefinitions won't work anymore

solved it with a patch of libstage/stage.hh:

@@ -647,46 +647,46 @@
{ cont.erase( std::remove( cont.begin(), cont.end(), thing ), cont.end() ); }

// Error macros - output goes to stderr
-#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", FILE, FUNCTION)
-#define PRINT_ERR1(m,a) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, FILE, FUNCTION)
-#define PRINT_ERR2(m,a,b) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, FILE, FUNCTION)
-#define PRINT_ERR3(m,a,b,c) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, FILE, FUNCTION)
-#define PRINT_ERR4(m,a,b,c,d) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, FILE, FUNCTION)
-#define PRINT_ERR5(m,a,b,c,d,e) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, e, FILE, FUNCTION)
+#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "#m" (%s %s)\n", FILE, FUNCTION)
+#define PRINT_ERR1(m,a) fprintf( stderr, "\033[41merr\033[0m: "#m" (%s %s)\n", a, FILE, FUNCTION)
+#define PRINT_ERR2(m,a,b) fprintf( stderr, "\033[41merr\033[0m: "#m" (%s %s)\n", a, b, FILE, FUNCTION)
+#define PRINT_ERR3(m,a,b,c) fprintf( stderr, "\033[41merr\033[0m: "#m" (%s %s)\n", a, b, c, FILE, FUNCTION)
+#define PRINT_ERR4(m,a,b,c,d) fprintf( stderr, "\033[41merr\033[0m: "#m" (%s %s)\n", a, b, c, d, FILE, FUNCTION)
+#define PRINT_ERR5(m,a,b,c,d,e) fprintf( stderr, "\033[41merr\033[0m: "#m" (%s %s)\n", a, b, c, d, e, FILE, FUNCTION)

// Warning macros
-#define PRINT_WARN(m) printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", FILE, FUNCTION)
-#define PRINT_WARN1(m,a) printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, FILE, FUNCTION)
-#define PRINT_WARN2(m,a,b) printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, FILE, FUNCTION)
-#define PRINT_WARN3(m,a,b,c) printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, FILE, FUNCTION)
-#define PRINT_WARN4(m,a,b,c,d) printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, FILE, FUNCTION)
-#define PRINT_WARN5(m,a,b,c,d,e) printf( "\033[44mwarn\033[0m: "m" (%s %s)\n", a, b, c, d, e, FILE, FUNCTION)
+#define PRINT_WARN(m) printf( "\033[44mwarn\033[0m: "#m" (%s %s)\n", FILE, FUNCTION)
+#define PRINT_WARN1(m,a) printf( "\033[44mwarn\033[0m: "#m" (%s %s)\n", a, FILE, FUNCTION)
+#define PRINT_WARN2(m,a,b) printf( "\033[44mwarn\033[0m: "#m" (%s %s)\n", a, b, FILE, FUNCTION)
+#define PRINT_WARN3(m,a,b,c) printf( "\033[44mwarn\033[0m: "#m" (%s %s)\n", a, b, c, FILE, FUNCTION)
+#define PRINT_WARN4(m,a,b,c,d) printf( "\033[44mwarn\033[0m: "#m" (%s %s)\n", a, b, c, d, FILE, FUNCTION)
+#define PRINT_WARN5(m,a,b,c,d,e) printf( "\033[44mwarn\033[0m: "#m" (%s %s)\n", a, b, c, d, e, FILE, FUNCTION)

// Message macros
#ifdef DEBUG
-#define PRINT_MSG(m) printf( "Stage: "m" (%s %s)\n", FILE, FUNCTION)
-#define PRINT_MSG1(m,a) printf( "Stage: "m" (%s %s)\n", a, FILE, FUNCTION)
-#define PRINT_MSG2(m,a,b) printf( "Stage: "m" (%s %s)\n", a, b, FILE, FUNCTION)
-#define PRINT_MSG3(m,a,b,c) printf( "Stage: "m" (%s %s)\n", a, b, c, FILE, FUNCTION)
-#define PRINT_MSG4(m,a,b,c,d) printf( "Stage: "m" (%s %s)\n", a, b, c, d, FILE, FUNCTION)
-#define PRINT_MSG5(m,a,b,c,d,e) printf( "Stage: "m" (%s %s)\n", a, b, c, d, e,FILE, FUNCTION)
+#define PRINT_MSG(m) printf( "Stage: "#m" (%s %s)\n", FILE, FUNCTION)
+#define PRINT_MSG1(m,a) printf( "Stage: "#m" (%s %s)\n", a, FILE, FUNCTION)
+#define PRINT_MSG2(m,a,b) printf( "Stage: "#m" (%s %s)\n", a, b, FILE, FUNCTION)
+#define PRINT_MSG3(m,a,b,c) printf( "Stage: "#m" (%s %s)\n", a, b, c, FILE, FUNCTION)
+#define PRINT_MSG4(m,a,b,c,d) printf( "Stage: "#m" (%s %s)\n", a, b, c, d, FILE, FUNCTION)
+#define PRINT_MSG5(m,a,b,c,d,e) printf( "Stage: "#m" (%s %s)\n", a, b, c, d, e,FILE, FUNCTION)
#else
-#define PRINT_MSG(m) printf( "Stage: "m"\n" )
-#define PRINT_MSG1(m,a) printf( "Stage: "m"\n", a)
-#define PRINT_MSG2(m,a,b) printf( "Stage: "m"\n,", a, b )
-#define PRINT_MSG3(m,a,b,c) printf( "Stage: "m"\n", a, b, c )
-#define PRINT_MSG4(m,a,b,c,d) printf( "Stage: "m"\n", a, b, c, d )
-#define PRINT_MSG5(m,a,b,c,d,e) printf( "Stage: "m"\n", a, b, c, d, e )
+#define PRINT_MSG(m) printf( "Stage: "#m"\n" )
+#define PRINT_MSG1(m,a) printf( "Stage: "#m"\n", a)
+#define PRINT_MSG2(m,a,b) printf( "Stage: "#m"\n,", a, b )
+#define PRINT_MSG3(m,a,b,c) printf( "Stage: "#m"\n", a, b, c )
+#define PRINT_MSG4(m,a,b,c,d) printf( "Stage: "#m"\n", a, b, c, d )
+#define PRINT_MSG5(m,a,b,c,d,e) printf( "Stage: "#m"\n", a, b, c, d, e )
#endif

// DEBUG macros
#ifdef DEBUG
-#define PRINT_DEBUG(m) printf( "debug: "m" (%s %s)\n", FILE, FUNCTION)
-#define PRINT_DEBUG1(m,a) printf( "debug: "m" (%s %s)\n", a, FILE, FUNCTION)
-#define PRINT_DEBUG2(m,a,b) printf( "debug: "m" (%s %s)\n", a, b, FILE, FUNCTION)
-#define PRINT_DEBUG3(m,a,b,c) printf( "debug: "m" (%s %s)\n", a, b, c, FILE, FUNCTION)
-#define PRINT_DEBUG4(m,a,b,c,d) printf( "debug: "m" (%s %s)\n", a, b, c ,d, FILE, FUNCTION)
-#define PRINT_DEBUG5(m,a,b,c,d,e) printf( "debug: "m" (%s %s)\n", a, b, c ,d, e, FILE, FUNCTION)
+#define PRINT_DEBUG(m) printf( "debug: "#m" (%s %s)\n", FILE, FUNCTION)
+#define PRINT_DEBUG1(m,a) printf( "debug: "#m" (%s %s)\n", a, FILE, FUNCTION)
+#define PRINT_DEBUG2(m,a,b) printf( "debug: "#m" (%s %s)\n", a, b, FILE, FUNCTION)
+#define PRINT_DEBUG3(m,a,b,c) printf( "debug: "#m" (%s %s)\n", a, b, c, FILE, FUNCTION)
+#define PRINT_DEBUG4(m,a,b,c,d) printf( "debug: "#m" (%s %s)\n", a, b, c ,d, FILE, FUNCTION)
+#define PRINT_DEBUG5(m,a,b,c,d,e) printf( "debug: "#m" (%s %s)\n", a, b, c ,d, e, FILE, FUNCTION)
#else
#define PRINT_DEBUG(m)
#define PRINT_DEBUG1(m,a)

FLTK bugs with multiple worlds

The WorldGui code doesn't work correctly when multiple worlds are run simultaneously. For example:

  • corrupted fonts in some windows
  • pausing in any window disables update of all windows

error in Installation from INSTALL.txt. Could not find map2.cc

Following the instructions in INSTALL.txt, at

$ cmake -DCMAKE_INSTALL_PREFIX=$STG Stage

cmake command displays error:

CMake Error at examples/ctrl/CMakeLists.txt:17 (ADD_LIBRARY):
  Cannot find source file:

    map2.cc

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

ctrl "wander" segfaults after warning "Model r0.ranger:1 not found"

Stage 4.1.1 installed via the ros-jade-stage package segfaults when trying to use the wander controller

/opt/ros/jade/bin$ ./stage /tmp/test.world 
Stage 4.1.1 
 [Loading /tmp/test.world]warn: lookup of model name r0.ranger:1: no matching name (/tmp/buildd/ros-jade-stage-4.1.1-6trusty-20151110-0906/libstage/world.cc GetModel)
warn: Model r0.ranger:1 not found (/tmp/buildd/ros-jade-stage-4.1.1-6trusty-20151110-0906/libstage/model.cc GetChild)
Segmentation fault (core dumped)

test.world is made from copy and pasted portions of the example worlds

define p2dxsonar sensor
(
  size [0.01 0.05 0.01 ] 
  range [0 5.0]
  fov 15
  samples 1
)

define amigo_sonar ranger
(
  p2dxsonar ( pose [ 0.073 0.105 0 90 ] )
  p2dxsonar ( pose [ 0.130 0.078 0 41 ] )
  p2dxsonar ( pose [ 0.154 0.030 0 15 ] )
  p2dxsonar ( pose [ 0.154 -0.030 0 -15 ] )
  p2dxsonar ( pose [ 0.130 -0.078 0 -41 ]   )
  p2dxsonar ( pose [ 0.073 -0.105 0 -90 ] )
  p2dxsonar ( pose [ -0.146 -0.060 0 -145 ] )
  p2dxsonar ( pose [ -0.146 0.060 0 145 ] )
)

define amigobot position
(
  size [0.330 0.280 0.25]
  origin [0 0 0 0] # what should this value be? send email to [email protected].
  amigo_sonar( pose [0 0 -0.02 0 ] )
)

amigobot
(
  name "r0"
  pose [ -6.946 -6.947 0 45.000 ]
  ctrl "wander"
  localization "gps"
  localization_origin [ 0 0 0 0 ]
)

The gdb backtrace looks like the following

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b954f0 in Stg::Model::AddCallback(Stg::Model::callback_type_t, int (*)(Stg::Model*, void*), void*) ()
   from /opt/ros/jade/lib/libstage.so.4.1.1
(gdb) bt
#0  0x00007ffff7b954f0 in Stg::Model::AddCallback(Stg::Model::callback_type_t, int (*)(Stg::Model*, void*), void*) ()
   from /opt/ros/jade/lib/libstage.so.4.1.1
#1  0x00007fffef555122 in Init () from /opt/ros/jade/lib/Stage-4.1/wander.so
#2  0x00007ffff7b9571a in Stg::Model::CallCallbacks(Stg::Model::callback_type_t) () from /opt/ros/jade/lib/libstage.so.4.1.1
#3  0x00007ffff7bac9b5 in Stg::World::Load(std::string const&) () from /opt/ros/jade/lib/libstage.so.4.1.1
#4  0x00007ffff7bc409a in Stg::WorldGui::Load(std::string const&) () from /opt/ros/jade/lib/libstage.so.4.1.1
#5  0x0000000000401181 in main ()

stage_ros crashes

I experience a variety of crashes while running Stage within stage_ros node. I put some of the here. I tried to compile the code on debug to provide better traces, but then stage_ros crashes at startup on libGLU.so library. So stack traces are not very meaningful, sorry. My wild guess is that it's all about memory management, as in one crash (I didn't recorded the bt) it mentioned "doubly freed memory", and also failures tend to increase when my PC has been working for a while (and so RAM gets low). I'll try to provide more information, but meanwhile... did anyone experience similar problems?
Thanks!

EXAMPLE CRASHES

This is the most common:

(gdb) bt
#0  0x00007ffff69827b6 in Stg::World::Raytrace(Stg::Ray const&) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#1  0x00007ffff6979c5e in Stg::ModelRanger::Sensor::Update(Stg::ModelRanger*) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#2  0x00007ffff6979e52 in Stg::ModelRanger::Update() () from /opt/ros/indigo/lib/libstage.so.4.1.1
#3  0x00007ffff6969bca in Stg::Model::UpdateWrapper(Stg::Model*, void*) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#4  0x00007ffff69833e8 in Stg::World::ConsumeQueue(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#5  0x00007ffff698346e in Stg::World::update_thread_entry(std::pair<Stg::World*, int>*) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#6  0x00007ffff6bbb184 in start_thread (arg=0x7fffdac38700) at pthread_create.c:312
#7  0x00007ffff5bac37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

I saw this one sometimes:

Program received signal SIGSEGV, Segmentation fault.
__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1517
1517    ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: No such file or directory.
(gdb) bt
#0  __memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1517
#1  0x00007ffff695fa75 in std::vector<Stg::Block*, std::allocator<Stg::Block*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<Stg::Block**, std::vector<Stg::Block*, std::allocator<Stg::Block*> > >, Stg::Block* const&) ()
   from /opt/ros/indigo/lib/libstage.so.4.1.1
#2  0x00007ffff697dc9a in Stg::Cell::AddBlock(Stg::Block*, unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#3  0x00007ffff6985327 in Stg::World::MapPoly(std::vector<Stg::point_int_t, std::allocator<Stg::point_int_t> > const&, Stg::Block*, unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#4  0x00007ffff695e08d in Stg::Block::Map(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#5  0x00007ffff695ec17 in Stg::BlockGroup::Map(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#6  0x00007ffff696581c in Stg::Model::Map(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#7  0x00007ffff6965878 in Stg::Model::MapWithChildren(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#8  0x00007ffff69753f6 in Stg::ModelPosition::Move() () from /opt/ros/indigo/lib/libstage.so.4.1.1
#9  0x00007ffff69835fd in Stg::World::Update() () from /opt/ros/indigo/lib/libstage.so.4.1.1
#10 0x00007ffff699d550 in Stg::WorldGui::Update() () from /opt/ros/indigo/lib/libstage.so.4.1.1
#11 0x00007ffff66c0f18 in Fl::wait(double) () from /usr/lib/x86_64-linux-gnu/libfltk.so.1.1
#12 0x0000000000465605 in main ()

And this only once:

(gdb) #0  0x00007ffff697dc57 in Stg::Cell::AddBlock(Stg::Block*, unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#1  0x00007ffff6985327 in Stg::World::MapPoly(std::vector<Stg::point_int_t, std::allocator<Stg::point_int_t> > const&, Stg::Block*, unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#2  0x00007ffff695e08d in Stg::Block::Map(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#3  0x00007ffff695ec17 in Stg::BlockGroup::Map(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#4  0x00007ffff696581c in Stg::Model::Map(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#5  0x00007ffff6965878 in Stg::Model::MapWithChildren(unsigned int) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#6  0x00007ffff696651b in Stg::Model::SetPose(Stg::Pose const&) () from /opt/ros/indigo/lib/libstage.so.4.1.1
#7  0x000000000045fd62 in StageNode::cb_reset_srv(std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&) ()
#8  0x0000000000487138 in boost::_mfi::mf2<bool, StageNode, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>::operator()(StageNode*, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&) const ()
#9  0x00000000004845b3 in bool boost::_bi::list3<boost::_bi::value<StageNode*>, boost::arg<1>, boost::arg<2> >::operator()<bool, boost::_mfi::mf2<bool, StageNode, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>, boost::_bi::list2<std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&> >(boost::_bi::type<bool>, boost::_mfi::mf2<bool, StageNode, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>&, boost::_bi::list2<std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>&, long) ()
#10 0x0000000000482698 in bool boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, StageNode, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>, boost::_bi::list3<boost::_bi::value<StageNode*>, boost::arg<1>, boost::arg<2> > >::operator()<std_srvs::EmptyRequest_<std::allocator<void> >, std_srvs::EmptyResponse_<std::allocator<void> > >(std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&) ()
#11 0x000000000047f693 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, StageNode, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>, boost::_bi::list3<boost::_bi::value<StageNode*>, boost::arg<1>, boost::arg<2> > >, bool, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>::invoke(boost::detail::function::function_buffer&, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&) ()
#12 0x0000000000494cf6 in boost::function2<bool, std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&>::operator()(std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&) const ()
#13 0x0000000000494257 in ros::ServiceSpec<std_srvs::EmptyRequest_<std::allocator<void> >, std_srvs::EmptyResponse_<std::allocator<void> > >::call(boost::function<bool (std_srvs::EmptyRequest_<std::allocator<void> >&, std_srvs::EmptyResponse_<std::allocator<void> >&)> const&, ros::ServiceSpecCallParams<std_srvs::EmptyRequest_<std::allocator<void> >, std_srvs::EmptyResponse_<std::allocator<void> > >&) ()
#14 0x0000000000492802 in ros::ServiceCallbackHelperT<ros::ServiceSpec<std_srvs::EmptyRequest_<std::allocator<void> >, std_srvs::EmptyResponse_<std::allocator<void> > > >::call(ros::ServiceCallbackHelperCallParams&) ()
#15 0x00007ffff78cea8a in ros::ServiceCallback::call() () from /opt/ros/indigo/lib/libroscpp.so
#16 0x00007ffff7911107 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/indigo/lib/libroscpp.so
#17 0x00007ffff7911c33 in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/indigo/lib/libroscpp.so
#18 0x00007ffff795a1e5 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from /opt/ros/indigo/lib/libroscpp.so
#19 0x00007ffff7941e0b in ros::spin() () from /opt/ros/indigo/lib/libroscpp.so
#20 0x0000000000494bad in void boost::_bi::list0::operator()<void (*)(), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(), boost::_bi::list0&, int) ()
#21 0x0000000000493e65 in boost::_bi::bind_t<void, void (*)(), boost::_bi::list0>::operator()() ()
#22 0x000000000049259e in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(), boost::_bi::list0> >::run() ()
#23 0x00007ffff6ddca4a in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0
#24 0x00007ffff6bbb184 in start_thread (arg=0x7fffda437700) at pthread_create.c:312
#25 0x00007ffff5bac37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

stageros + rviz cause segfault

Hi, i'm simulating an array of robots with laser and I want to see all laser scans in Rviz.

After start roscore, if I rosrun stageros node and then rviz node, the problem appears:

gustavo@gustavo-ProBook:~$ rosrun rviz rviz 
[ INFO] [1361665790.163219703]: rviz version 1.9.20
[ INFO] [1361665790.163372795]: compiled against OGRE version 1.7.4 (Cthugha)
[ WARN] [1361665794.846113178, 38.500000000]: OGRE         EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/box.geom invalid valueCannot compile GLSL high-level shader : rviz/box.geom invalid value in GLSLProgram::compile at /build/buildd/ogre-1.7.4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
[ WARN] [1361665794.858389102, 38.500000000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /build/buildd/ogre-1.7.4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)
[ WARN] [1361665794.865810096, 38.500000000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /build/buildd/ogre-1.7.4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)
[ WARN] [1361665794.866371060, 38.500000000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /build/buildd/ogre-1.7.4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)
[ WARN] [1361665795.010072435, 38.600000000]: OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/pass_pos_color.vert Cannot compile GLSL high-level shader : rviz/pass_pos_color.vert 0:1(15): preprocessor error: syntax error, unexpected IDENTIFIER, expecting NEWLINE
 in GLSLProgram::compile at /build/buildd/ogre-1.7.4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
Violación de segmento (`core' generado)

The curious part is that if I rosrun rviz node first and then start stageros node, everything is fine.

I'm using ROS groovy + Ubuntu 12.04

Obtain Obstacle Co-ordinates from Stage to position VisualMarker in Rviz

Hello there,
I am quite new to using Stage-Sim. I positioned a Model in the stage sim so that it behaves as an obstacle for the mobile robot. Now I want to obtain the co-ordinates of this obstacle from the stage sim and use this location to position a Rviz Marker such that when the user manually moves the obstacle in Stage-Sim the position of the RViz Marker is also updated.
Please advise how I can do this.

stage 4.1.1 - window freezes when selecting world file

Hi, I'm running stage 4.1.1 which I believe was installed on Ubuntu 16.04 via package ros-kinetic-stage.

I start the appplication by
stage ., and the GUI comes up. I can then use File->Load world , and select a world file. It loads up the world, but after that the stage program just freezes. It is not possible to click on any of the menu items, or the world gui. Even using the X to close the window doesn't work, so I have to Ctrl-C in the terminal where stage was started.

image

I've tried various world files downloaded from the examples at http://player-stage-manual.readthedocs.io/

The terminal just says:

frode@xenialxerus:~/GIT/Ghost/ROS/Stage$ stage .
Stage 4.1.1 
 [Loading .]
 [Loading /home/frode/Downloads/Player-Stage-Manual-master/code/Ch3/bigbob4.world]

with no errors or warnings printed.

What could be the cause of this? Something to do with the display drivers?

robot ranger not always detecting bitmap

Hi,

The change in the code for bitmap to mesh conversion seems to cause the virtual rangers to sometimes not see the walls at all. This was not a problem with previous versions of stage. Because I have collision detection turned off, this causes my robots to escape their enclosure and disappear somewhere into the distance.

--Scott

stage command not found

I followed all the steps of installation but when I want to test by running an example I get a meaasge that "stage command is not found".

Stage 4.0.0/Player 3.0.2 Mac OSX Lion/Snow Leopard Issue

Hi,

I've tried reinstalling different types of Stages/Player on different Mac OS's but looks like I always have issues with Stage 4.0.0. For my uni project I need to use this version. Everything works fine when I install Stage 3.2.2 but when I try to run a file on Stage 4.0.0 I get errors as shown on the screenshot below as well as the window of player (on the left side of the screen) hangs and I have to force quit it.

http://gyazo.com/0b47f5235341b751841f64d4431ccf51.png

I would really appreciate if you could help me get this fixed!

Kind Regards,

Adilet

libstage.so.4.1.1: undefined reference to `...'

I am trying to install on Slackware Linux 14.2 as part of ROS Kinetic. Here is a log:

==> Processing plain cmake package: 'stage'
==> Creating build directory: 'build_isolated/stage/install'
==> Building with env: '/home/niko/ros_catkin_ws/install_isolated/env.sh'
==> cmake /home/niko/ros_catkin_ws/src/stage -DCMAKE_INSTALL_PREFIX=/home/niko/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/niko/ros_catkin_ws/build_isolated/stage/install'
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Stage version 4.1.1
-- Operating system is Linux
-- Installing Libraries to /home/niko/ros_catkin_ws/install_isolated/lib
-- Installing Plugins to /home/niko/ros_catkin_ws/install_isolated/lib/Stage-4.1
-- Build type RELEASE
-- Checking for libtool
-- Checking for required libraries...
-- Found JPEG: /usr/lib64/libjpeg.so  
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8") 
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.23") 
-- Found OpenGL: /usr/lib64/libGL.so  
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found FLTK: /usr/lib64/libfltk_images.a;/usr/lib64/libfltk_forms.a;/usr/lib64/libfltk_gl.a;/usr/lib64/libGL.so;/usr/lib64/libfltk.a  
-- Checking for optional libraries...
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'playercore>=2.1.0'
--   * Player not detected. If Player is installed but not detected, check your PKG_CONFIG_PATH.
-- Installation path CMAKE_INSTALL_PREFIX=/home/niko/ros_catkin_ws/install_isolated
-- Configuring libstage
-- Configuring done
CMake Warning (dev) at libstage/CMakeLists.txt:84 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "stagebinary" links to some libraries for which the linker
  must search:

    pthread

  and other libraries with known full path:

    /home/niko/ros_catkin_ws/build_isolated/stage/install/libstage/libstage.so.4.1.1

  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/niko/ros_catkin_ws/build_isolated/stage/install
==> make -j1 -l1 in '/home/niko/ros_catkin_ws/build_isolated/stage/install'
Scanning dependencies of target stage
[  1%] Building CXX object libstage/CMakeFiles/stage.dir/block.o
[  3%] Building CXX object libstage/CMakeFiles/stage.dir/blockgroup.o
[  5%] Building CXX object libstage/CMakeFiles/stage.dir/camera.o
[  6%] Building CXX object libstage/CMakeFiles/stage.dir/color.o
[  8%] Building CXX object libstage/CMakeFiles/stage.dir/file_manager.o
[ 10%] Building CXX object libstage/CMakeFiles/stage.dir/gl.o
[ 12%] Building CXX object libstage/CMakeFiles/stage.dir/logentry.o
[ 13%] Building CXX object libstage/CMakeFiles/stage.dir/model.o
[ 15%] Building CXX object libstage/CMakeFiles/stage.dir/model_actuator.o
[ 17%] Building CXX object libstage/CMakeFiles/stage.dir/model_blinkenlight.o
[ 18%] Building CXX object libstage/CMakeFiles/stage.dir/model_blobfinder.o
[ 20%] Building CXX object libstage/CMakeFiles/stage.dir/model_callbacks.o
[ 22%] Building CXX object libstage/CMakeFiles/stage.dir/model_camera.o
[ 24%] Building CXX object libstage/CMakeFiles/stage.dir/model_draw.o
[ 25%] Building CXX object libstage/CMakeFiles/stage.dir/model_fiducial.o
[ 27%] Building CXX object libstage/CMakeFiles/stage.dir/model_gripper.o
[ 29%] Building CXX object libstage/CMakeFiles/stage.dir/model_lightindicator.o
[ 31%] Building CXX object libstage/CMakeFiles/stage.dir/model_position.o
[ 32%] Building CXX object libstage/CMakeFiles/stage.dir/model_ranger.o
[ 34%] Building CXX object libstage/CMakeFiles/stage.dir/option.o
[ 36%] Building CXX object libstage/CMakeFiles/stage.dir/powerpack.o
[ 37%] Building CXX object libstage/CMakeFiles/stage.dir/region.o
[ 39%] Building CXX object libstage/CMakeFiles/stage.dir/stage.o
[ 41%] Building CXX object libstage/CMakeFiles/stage.dir/texture_manager.o
[ 43%] Building CXX object libstage/CMakeFiles/stage.dir/typetable.o
[ 44%] Building CXX object libstage/CMakeFiles/stage.dir/world.o
[ 46%] Building CXX object libstage/CMakeFiles/stage.dir/worldfile.o
[ 48%] Building CXX object libstage/CMakeFiles/stage.dir/canvas.o
[ 50%] Building CXX object libstage/CMakeFiles/stage.dir/options_dlg.o
[ 51%] Building CXX object libstage/CMakeFiles/stage.dir/vis_strip.o
[ 53%] Building CXX object libstage/CMakeFiles/stage.dir/worldgui.o
[ 55%] Building CXX object libstage/CMakeFiles/stage.dir/ancestor.o
[ 56%] Linking CXX shared library libstage.so
[ 56%] Built target stage
Scanning dependencies of target stagebinary
[ 58%] Building CXX object libstage/CMakeFiles/stagebinary.dir/main.o
[ 60%] Linking CXX executable stage
libstage.so.4.1.1: undefined reference to `FcPatternAddString'
libstage.so.4.1.1: undefined reference to `XcursorImageLoadCursor'
libstage.so.4.1.1: undefined reference to `XftFontOpenXlfd'
libstage.so.4.1.1: undefined reference to `FcPatternAddMatrix'
libstage.so.4.1.1: undefined reference to `FcUtf8ToUcs4'
libstage.so.4.1.1: undefined reference to `XftTextExtents32'
libstage.so.4.1.1: undefined reference to `XftDrawSetClip'
libstage.so.4.1.1: undefined reference to `FcMatrixRotate'
libstage.so.4.1.1: undefined reference to `XftFontMatch'
libstage.so.4.1.1: undefined reference to `XineramaQueryScreens'
libstage.so.4.1.1: undefined reference to `FcPatternCreate'
libstage.so.4.1.1: undefined reference to `XftFontOpen'
libstage.so.4.1.1: undefined reference to `XftDrawString32'
libstage.so.4.1.1: undefined reference to `FcUtf8Len'
libstage.so.4.1.1: undefined reference to `XftDrawCreate'
libstage.so.4.1.1: undefined reference to `XineramaIsActive'
libstage.so.4.1.1: undefined reference to `XftFontOpenPattern'
libstage.so.4.1.1: undefined reference to `XftDrawChange'
libstage.so.4.1.1: undefined reference to `FcPatternAddDouble'
libstage.so.4.1.1: undefined reference to `FcPatternAddInteger'
libstage.so.4.1.1: undefined reference to `FcPatternDestroy'
libstage.so.4.1.1: undefined reference to `XcursorImageCreate'
libstage.so.4.1.1: undefined reference to `XcursorImageDestroy'
collect2: error: ld returned 1 exit status
libstage/CMakeFiles/stagebinary.dir/build.make:119: recipe for target 'libstage/stage' failed
make[2]: *** [libstage/stage] Error 1
CMakeFiles/Makefile2:119: recipe for target 'libstage/CMakeFiles/stagebinary.dir/all' failed
make[1]: *** [libstage/CMakeFiles/stagebinary.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'stage': 
  Command '['/home/niko/ros_catkin_ws/install_isolated/env.sh', 'make', '-j1', '-l1']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/niko/ros_catkin_ws/build_isolated/stage && /home/niko/ros_catkin_ws/install_isolated/env.sh make -j1 -l1

Command failed, exiting.

I noticed the warning

CMake Warning (dev) at libstage/CMakeLists.txt:84 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as

    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

Tried with including this before libstage/CMakeLists.txt:84 and making a clean build. The warning was suppressed, but the same errors occurred at the end. cmake_policy(SET CMP0003 OLD) did not work either.

My version of cmake is 3.5.2. Any suggestions on how to fix?

compiling error

on ubuntu 10.04 32 bit, compiling rtv-Stage-ec78a1c got this error:
rtv-Stage-ec78a1c/libstageplugin/p_driver.cc:151:
/libstageplugin/p_driver.h:179: error: ISO C++ forbids declaration of ‘InterfaceLaser’ with no type
libstageplugin/p_driver.h:180: error: expected class-name before ‘(’ token
libstageplugin/p_driver.cc: In constructor ‘StgDriver::StgDriver(ConfigFile_, int)’:
libstageplugin/p_driver.cc:335: error: no matching function for call to ‘InterfaceRanger::InterfaceRanger(player_devaddr_t&, StgDriver_ const, ConfigFile_&, int&)’
/libstageplugin/p_driver.h:175: note: candidates are: InterfaceRanger::InterfaceRanger()
libstageplugin/p_driver.h:175: note: InterfaceRanger::InterfaceRanger(const InterfaceRanger&)
make[2]: *_* [libstageplugin/CMakeFiles/stageplugin.dir/p_driver.o] Errore 1
make[1]: *** [libstageplugin/CMakeFiles/stageplugin.dir/all] Errore 2

stage: command not found

I just installed Stage, I've done all steps required in install.txt. but when I try to execute this code via Terminal "stage simple.world" I get this error:
"stage: command not found"
I don't know what to do, I am new ti ubuntu and to stage.
Thanks for you help in advance :).

Make error: ‘PLAYER_CAPABILITIES_REQ’ no se declaró en este ámbito (was not declared in this scope)

Trying to make following INSTALL.txt this error appears:

[ 91%] Building CXX object libstageplugin/CMakeFiles/stageplugin.dir/p_fiducial.o /home/gustavo/ros_ws/src/vintersim/Stage/libstageplugin/p_simulation.cc: En la función miembro ‘virtual int InterfaceSimulation::ProcessMessage(QueuePointer&, player_msghdr_t*, void*)’: /home/gustavo/ros_ws/src/vintersim/Stage/libstageplugin/p_simulation.cc:155:52: error: ‘PLAYER_CAPABILITIES_REQ’ no se declaró en este ámbito /home/gustavo/ros_ws/src/vintersim/Stage/libstageplugin/p_simulation.cc:451:26: aviso: la dereferencia de punteros ‘type-punned’ romperá las reglas de alias estricto [-Wstrict-aliasing] make[2]: *** [libstageplugin/CMakeFiles/stageplugin.dir/p_simulation.o] Error 1 make[2]: *** Se espera a que terminen otras tareas.... make[1]: *** [libstageplugin/CMakeFiles/stageplugin.dir/all] Error 2 make: *** [all] Error 2

compiling error

on Mac OS 10.6.6, compiling rtv-Stage-508538b I got this error:

[ 98%] Building CXX object libstageplugin/CMakeFiles/stageplugin.dir/p_graphics.o
/rtv-Stage-508538b/libstageplugin/p_graphics.cc: In member function ‘virtual int InterfaceGraphics2d::ProcessMessage(QueuePointer&, player_msghdr_t_, void_)’:
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:236: error: ‘PLAYER_GRAPHICS2D_CMD_MULTILINE’ was not declared in this scope
/rtv-Stage-508538b/libstageplugin/p_graphics.cc: In member function ‘virtual void PlayerGraphics2dVis::RenderItem(Message&)’:
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:277: error: ‘PLAYER_GRAPHICS2D_CMD_MULTILINE’ was not declared in this scope
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:278: error: ‘player_graphics2d_cmd_multiline_t’ was not declared in this scope
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:279: error: ‘data’ was not declared in this scope
s/rtv-Stage-508538b/libstageplugin/p_graphics.cc:280: error: expected type-specifier before ‘player_graphics2d_cmd_multiline_t’
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:280: error: expected >' before ‘player_graphics2d_cmd_multiline_t’ /rtv-Stage-508538b/libstageplugin/p_graphics.cc:280: error: expected(' before ‘player_graphics2d_cmd_multiline_t’
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:280: error: expected primary-expression before ‘>’ token
/rtv-Stage-508538b/libstageplugin/p_graphics.cc:280: error: expected `)' before ‘;’ token
make[2]: *** [libstageplugin/CMakeFiles/stageplugin.dir/p_graphics.o] Error 1
make[1]: *** [libstageplugin/CMakeFiles/stageplugin.dir/all] Error 2
make: *** [all] Error 2

I'm getting the same compiling error if I work with Stage-4.0.0 or the latest version cloned with git. But Stage 3.2.2 works fine for me.

Collision detection using libstage v4.1.1

With a vanilla installation of Stage v4.1.1 I find that agents can pass through obstacles.

Recreating error:

head to examples folder and edit line 152 of stest.cc to:
robots[idx].position->SetSpeed( 0.5, side_speed, 0.0 );

When stest.cc is compiled and run with the command:

stest simple.world 1

Thew agent can be seen detecting obstacles but not colliding with them, instead the agent just passes through them.

Parameter obstacle_return in pioneer.inc for definition of pioneer_base is set to 1. As far as I know this is the only parameter involved that could effect collision detection.

This is being run on Ubuntu 10.04 LTS.

I will create a new virtual machine tonight and see if I still get this error.

ModelCamera ignores x and y components of its pose

In Stage-4.1.1 the camera model does not take into account the x and y parts of it's pose. Camera images appear to come from the perspective of the middle of the ModelPosition the camera is on. They should instead be coming from the center of the ModelCamera itself.

The camera below should not be able to see the robot body, but it does.
stage_camera_bug

Here's a stage world that reproduces the issue

interval_sim 50
quit_time 0
resolution 0.02
show_clock 0
show_clock_interval 100
threads 2

window
(
    size [ 600.0 700.0 ]
    center [ 0.0 0.0 ]
    rotate [ 0.0 0.0 ]
    scale 60
)

define o3d3o3 camera
(
    size [ 0.09 0.06 0.06 ]
    color "gray20"
    range [ 0.2 8.0 ]
    resolution [ 176 132 ]
    fov [ 60 40 ]
    pantilt [ 0 65 ]
    alwayson 1
)

define robot_body position
(
    #position properties
    drive "omni"
    localization "gps"
    localization_origin [0 0 0 0]
    watchdog_timeout 0.5

    # Model properties
    size [0.5 0.5 0.5]
    origin [0 0 0 0]
    velocity [0 0 0 0]
    gui_nose 1
    gui_grid 1
    gui_boundary 1
    obstacle_return 1
    ranger_return 1
    color "red"

    o3d3o3
    (
        pose [0.5 0 1.0 0]
    )
)

robot_body
(
    pose [0 0 0 -90]
)

Error compiling code from the thread and the master tag version 4.0.1

When I am trying to build code from the master branch get (The same problem occurs when building version 4.0.1 with the label):

[87%] Building CXX object libstageplugin / CMakeFiles / stageplugin.dir / p_gripper.o
[89%] Building CXX object libstageplugin / CMakeFiles / stageplugin.dir / p_simulation.o
[91%] Building CXX object libstageplugin / CMakeFiles / stageplugin.dir / p_fiducial.o
[93%] Building CXX object libstageplugin / CMakeFiles / stageplugin.dir / p_position.o
[94%] Building CXX object libstageplugin / CMakeFiles / stageplugin.dir / p_ranger.o
/ Home / evgeny / software / libs / Stage / libstageplugin / p_simulation.cc: In member function 'virtual int InterfaceSimulation:: ProcessMessage (QueuePointer &, player_msghdr_t , void *)':
/ Home / evgeny / software / libs / Stage / libstageplugin / p_simulation.cc: 155:52: error: 'PLAYER_CAPABILITIES_REQ' was not declared in this scope
/ Home / evgeny / software / libs / Stage / libstageplugin / p_simulation.cc: 451:26: warning: dereferencing type-punned pointer will break strict-aliasing rules
make [2]: *
* [libstageplugin / CMakeFiles / stageplugin.dir / p_simulation.o] Error 1

to use the simulator downloaded and installed version 4.00 - it all builds and runs fine

make error

[ 89%] Building CXX object libstageplugin/CMakeFiles/stageplugin.dir/p_simulation.o
/home/shp/stage4/Stage/libstageplugin/p_simulation.cc: 在成员函数‘virtual int InterfaceSimulation::ProcessMessage(QueuePointer&, player_msghdr_t_, void_)’中:
/home/shp/stage4/Stage/libstageplugin/p_simulation.cc:155:52: 错误: ‘PLAYER_CAPABILITIES_REQ’在此作用域中尚未声明
/home/shp/stage4/Stage/libstageplugin/p_simulation.cc:451:26: 警告: 提领类型双关的指针将破坏强重叠规则 [-Wstrict-aliasing]
make[2]: *** [libstageplugin/CMakeFiles/stageplugin.dir/p_simulation.o] 错误 1
make[1]: *** [libstageplugin/CMakeFiles/stageplugin.dir/all] 错误 2
make: *** [all] 错误 2

SFU_800x600.png required by worlds/large.world, removed from repository

The file worlds/bitmaps/SFU_800x600.png, which is still available in 59d66b4, was removed in later versions. However, the file world/large.world still depends on this file.

Can either the file large.world be updated, or the file SFU_800x600.png be resubmitted, so that fresh Stage installs do not return an error when trying some code?

Stage 4.1.1 display problem in Ubuntu

Hi,
I have Stage 4.1.1 install in both Ubuntu 12.04 64bit (Vmware Fusion 5.0.2) & Mac 10.6.8
I try several ways to install Stage4.1.1 in Ubuntu ( with ros or directly from github). I still can't get simple world file display correctly in Ubuntu. I really don't know what cause it. I have same problem on every Ubuntu I installed, too( not in Vmware). The simple.world is the one come with stage 4.1.1 without any modification. Please let me know if you need for information on my setup. Thanks.
Here is the screen shot for it.
ScreenshotUbuntu-Mac

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.