ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are several issues when using Fuerte and Stage 4.1.1 regarding stage controllers.

Re: warn: Model roomba.ranger:1 not found

The stageros wrapper only expects one ranger per robot but the wander controller in Stage expects the laser to be the second ranger. The line in wander.cc that causes this warning is:

robot->laser = (ModelRanger*)mod->GetChild( "ranger:1" );

Re: Segmentation fault (core dumped)

This appears to be related to the use of the roomba model (when I inspected the stack trace the problem was in some drawing code) - pioneer or simple position models work OK (once wander.cc has been edited).

However, stageros will stop all robots that have not received a velocity command in the last 0.2 seconds which is a problem if using a stage controller to control that robot.

To address these issues, I forked the Stage repository and edited stage.hh and model.cc to store and expose a uses_controller attribute for each Model. I then edited stageros.cpp (in a local copy of the stage stack) to make use of it, so that robots that have stage controllers are not exposed to ROS. I also edited wander.cc to get the first ranger it finds for any robot (this will break the simple.world demo found in Stage/worlds - I've added a gsh-simple.world demo that will work)

My forked repo is available at git://github.com/grahamhorn/Stage.git

I've included my edited stageros.cpp file in a stageros directory.

These commands should get things working:

First create an overlay for stage in your $ROS_WORKSPACE

$ roslocate info turtlebot | rosws merge -
$ rosws update

and build it:

$ rosmake stage

Then clone my Stage repo and build it:

$ mkdir stage4
$ cd stage4
$ git clone git://github.com/grahamhorn/Stage.git
$ cmake -DCMAKE_INSTALL_PREFIX=$ROS_WORKSPACE/stage Stage
$ make install

Test:

In one terminal:

$ roscore

In a second terminal:

$ rosrun stage stageros /home/gsh/stage4/Stage/worlds/gsh-simple.world

You should see one moving robot (controlled by the wander controller) and one static robot (exposed to ROS and waiting for commands).

There are several issues when using Fuerte and Stage 4.1.1 regarding stage controllers.

Re: warn: Model roomba.ranger:1 not found

The stageros wrapper only expects one ranger per robot but the wander controller in Stage expects the laser to be the second ranger. The line in wander.cc that causes this warning is:

robot->laser = (ModelRanger*)mod->GetChild( "ranger:1" );

Re: Segmentation fault (core dumped)

This appears to be related to the use of the roomba model (when I inspected the stack trace the problem was in some drawing code) - pioneer or simple position models work OK (once wander.cc has been edited).

However, stageros will stop all robots that have not received a velocity command in the last 0.2 seconds which is a problem if using a stage controller to control that robot.

To address these issues, I forked the Stage repository and edited stage.hh and model.cc to store and expose a uses_controller attribute for each Model. I then edited stageros.cpp (in a local copy of the stage stack) to make use of it, so that robots that have stage controllers are not exposed to ROS. I also edited wander.cc to get the first ranger it finds for any robot (this will break the simple.world demo found in Stage/worlds - I've added a gsh-simple.world demo that will work)

My forked repo is available at git://github.com/grahamhorn/Stage.git

I've included my edited stageros.cpp file in a stageros directory.

These commands should get things working:

First create an overlay for stage in your $ROS_WORKSPACE

$ roslocate info turtlebot | rosws merge -
$ rosws update

and build it:

$ rosmake stage

Then clone my Stage repo and build it:

$ mkdir stage4
$ cd stage4
$ git clone git://github.com/grahamhorn/Stage.git
$ cmake -DCMAKE_INSTALL_PREFIX=$ROS_WORKSPACE/stage Stage
$ make install

Test:

In one terminal:

$ roscore

In a second terminal:

$ rosrun stage stageros /home/gsh/stage4/Stage/worlds/gsh-simple.world
<your path>/stage4/Stage/worlds/gsh-simple.world

You should see one moving robot (controlled by the wander controller) and one static robot (exposed to ROS and waiting for commands).