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

stage error in fuerte

asked 2012-05-14 08:39:21 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello,

I just installed Fuerte and tried a simulation with stage. But, when I tried to apply tutorials given in ROS, it gives the error related to model type of the laser:

err: Model type laser not found in model typetable (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/world.cc CreateModel)

err: Unknown model type laser in world file. (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/world.cc CreateModel)

any idea how to solve these problems? Thanks in advance...

edit retag flag offensive close merge delete

8 Answers

Sort by ยป oldest newest most voted
14

answered 2012-05-27 05:15:12 -0600

Nick Armstrong-Crews gravatar image

updated 2012-05-27 08:04:30 -0600

Just encountered the same.

Apparently, you just need to replace all occurrences of "laser" with "ranger" (as per this post )

Here's a handy one-liner to do so (for all stage files below current directory):

`perl -p -i -e 's/laser/ranger/g' $(find . -name *.world) $(find . -name *.inc)`
I also notice the `upgrade-world.sh` script in stage pkg... may be useful for getting rid of other deprecated stuff in your .world files? UPDATE: looks like you also have to wrap your laser in a "sensor" block... So the old sick.inc ...
define sick laser
(
    range_max 80
    fov 180.0
    samples 180
    size [ 0.156 0.155 0.19 ]
)

Has now become:

define sick ranger
(
  sensor(
    range [ 0 80 ]
    fov 180.0
    samples 180
  )
  size [ 0.156 0.155 0.19 ]
)
edit flag offensive delete link more

Comments

@Nick Armstrong-Crews Hi, I wrote two of the stage tutorials available at ROS (stage 3.2.2, which works on diamondback and electric) - does this modification work with the roomba-wander.world at http://www.ros.org/wiki/stage/Tutorials/IntroductiontoStageControllers ?

Arkapravo gravatar image Arkapravo  ( 2012-05-27 10:37:41 -0600 )edit
1

Thanks for the detailed example, Nick. We should add a migration link to the Stage wiki page.

joq gravatar image joq  ( 2012-05-28 11:44:39 -0600 )edit

@joq Yep ! that is exactly what I was thinking about !

Arkapravo gravatar image Arkapravo  ( 2012-05-28 20:48:28 -0600 )edit

@Nick Armstrong-Crews Hi, I could not make roomba-wander.world to work with that change in fuerte ! :-( ! Anyway, I am just staring off with fuerte !

Arkapravo gravatar image Arkapravo  ( 2012-05-28 21:39:22 -0600 )edit
1

Hi , I made the changes but now it says : warn: worldfile 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)

tonyParker gravatar image tonyParker  ( 2014-09-18 07:40:29 -0600 )edit

This didn't work for me! Did anyone got this working on Stage_ROS kinetic? Facing the same issue!

Sanjay Nag gravatar image Sanjay Nag  ( 2019-08-15 14:11:42 -0600 )edit
6

answered 2012-10-04 10:56:27 -0600

Graham gravatar image

updated 2012-10-08 01:03:08 -0600

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 <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).

edit flag offensive delete link more

Comments

@Graham what still surprises me is that the wrapper (and everything else, roomba model and also the stage controllers) worked nicely in Electric and Diamondback but in gave error in Fuerte.

Arkapravo gravatar image Arkapravo  ( 2012-10-04 20:53:17 -0600 )edit

I've only tried it in Fuerte. The switch to Stage version 4 is the main cause of the problems.

Graham gravatar image Graham  ( 2012-10-09 06:30:25 -0600 )edit

@Graham Just a gut feel - I would expect that only tinkering with the stageros wrapper should solve the problem. One may not need to dig into wander.cc, wander.cc is a part of parent stage (https://github.com/rtv/Stage) and playing with that may not be greatly advisable.

Arkapravo gravatar image Arkapravo  ( 2012-10-09 19:32:59 -0600 )edit

I needed to edit Stage to expose information about whether models used a controller. I agree that rather than editing wander.cc I should have edited a copy e.g. wander-ranger-only.cc.

Graham gravatar image Graham  ( 2012-10-16 00:07:51 -0600 )edit

@Graham Have been going through your repository - have you got the goal directed stage controller to work ? is the goal coordinates given as hard coded into the code script or through some graphical means (rviz etc) ?

Arkapravo gravatar image Arkapravo  ( 2012-11-19 17:21:17 -0600 )edit

@Graham your code compiles and also builds - but could not make it run. Guess it may be better to communicate via email.

Arkapravo gravatar image Arkapravo  ( 2012-11-19 20:10:08 -0600 )edit

@Graham: Hi, although this post is a bit older I would like to ask for some advice using your stage overlay. It did not work. I had to make a STAGEPATH variable containing Folders for libs and ctrl. Now Stage comes up, ctrl is initialized but robot does not move. Pose data (verbose) is weird. Ideas?

cldoppler gravatar image cldoppler  ( 2014-01-29 05:03:03 -0600 )edit

@Graham: also both robots of your example are visible in rostopics despite one has der "wander_single_ranger" control.

cldoppler gravatar image cldoppler  ( 2014-01-29 05:04:48 -0600 )edit
2

answered 2012-05-14 14:20:26 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Fuerte has stage 4.1.1 (Electric had 3.2.2).

Stage version 4 no longer supports the laser model, it has been replaced by a more generic ranger interface.

edit flag offensive delete link more
0

answered 2012-06-15 11:08:41 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Though it is implied in previous responses, this also means changing:

define floorplan model ( 
  ...  
  laser_return 1 
)

to

define floorplan model
(
  ...
  ranger_return 1
)
edit flag offensive delete link more
0

answered 2012-05-14 16:08:15 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Thanks for your answer. Now my mind a bit confused since I am new on ROS. Can you tell me what I can do now and do you have any suggestion for simulation? Actually, right now I am using world files include "pioneer.inc" and "sick.inc", and they seem to work well.

edit flag offensive delete link more

Comments

haven't tried it myself, but this looks useful for learning: http://www.ros.org/wiki/stage/Tutorials/MakingMapsUsingStagesWanderController

Nick Armstrong-Crews gravatar image Nick Armstrong-Crews  ( 2012-05-27 07:43:11 -0600 )edit

@musti If you are using stage or payer/stage then the usual approach is using .inc, .cfg and .world file while stage with ROS usually employs .world files or .launch files (which are again connected to .world files).

Arkapravo gravatar image Arkapravo  ( 2012-05-27 10:28:48 -0600 )edit
0

answered 2012-05-15 04:20:49 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi!

I installed ROS 2 days ago too, and I have got exactly the same problem. I've tried some other world files, but couldn't get it to work. I would really appreciate a rockie friendly solution.

Thx a lot!

edit flag offensive delete link more

Comments

Try this tutorial - http://www.ros.org/wiki/stage/Tutorials/SimulatingOneRobot - should work with fuerte.

Arkapravo gravatar image Arkapravo  ( 2012-10-03 05:18:17 -0600 )edit
0

answered 2012-09-19 01:45:12 -0600

Claudio gravatar image

updated 2012-10-03 04:50:28 -0600

Not only did I modify all the laser calls to ranger, I also copied the sick.inc file from a working stage 4 installation, and included that in the roomba tutorial world. No joy.

Now the errors are

 [Loading /home/erupter/Apps/ROS/stage_controllers/world/myroomba.world][Include sick.inc][Image "bitmaps/roomba-stage.png"]warn: lookup of model name roomba.ranger:1: no matching name (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/world.cc GetModel)
warn: Model roomba.ranger:1 not found (/tmp/buildd/ros-fuerte-stage-1.6.6/debian/ros-fuerte-stage/opt/ros/fuerte/stacks/stage/build/stage/libstage/model.cc GetChild)
Segmentation fault (core dumped)

Safe to say the word "ranger" is nowhere to be found in my modified roomba world, and yet it seems something calls for a ranger.. I suppose tutorials need updating. I wander what the problem with stage is, anybody solved that?

I used the standard notation and file coming from the standalone Stage 4 installation (sick.inc). The error is the same as if the model ranger wasn't found.

I also tried following the stage tutorial at http://www.ros.org/wiki/stage/Tutorials/SimulatingOneRobot

But encountered two errors:

  • checking out teleop_base is a no go, requires user and pass (no anonym?)
  • manually downloading files and running rosmake results in error

    [rospack] Error: package/stack teleop_base depends on non-existent package joy

    CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:129 (message):

    Failed to invoke rospack to get compile flags for package
    

    'teleop_base'. Look above for errors from rospack itself. Aborting. Please fix the broken dependency!

    Call Stack (most recent call first): /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:203 (rosbuild_invoke_rospack) CMakeLists.txt:3 (rosbuild_init)

edit flag offensive delete link more

Comments

@erupter For teleop_base there is a minor error, have a look here - http://answers.ros.org/question/11980/teleop_base-compile-errors-from-boost/#18095

Arkapravo gravatar image Arkapravo  ( 2012-09-19 03:51:25 -0600 )edit

Actually my problem with teleop_base appears to be related to a missing package called Joy Error: package/stack teleop_base depends on non-existent package joy

I noticed Arkapravo you are the man behind the basic roomba world for stage. May I ask you why you haven't posted a solution?

Claudio gravatar image Claudio  ( 2012-10-03 04:44:37 -0600 )edit

@erupter I designed those simulations for diamondback and electric - those ROS distributions had Stage 3.2.2. ROS fuerte has Stage 4.1.1 - I have no claims on that one yet ! My tutorials say very clearly that they are meant for Electric and Diamondback.

Arkapravo gravatar image Arkapravo  ( 2012-10-03 05:11:53 -0600 )edit

@erupter For the joy error use - sudo apt-get install ros-fuerte-joystick-drivers. However, as I mentioned previously there is some coding error in teleop_base, you will have to manually rectify it.

Arkapravo gravatar image Arkapravo  ( 2012-10-03 05:13:54 -0600 )edit

Thanks Arkapravo. Installed the joystick package, still missing the control-toolbox. Already did the modification in the source.

Claudio gravatar image Claudio  ( 2012-10-04 07:13:35 -0600 )edit
0

answered 2013-01-24 02:45:49 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi everyone,

This is more of a NOTE -- I am not expecting to be voted up or down here.

As Graham has pointed out that there may be an issue with the roomba model, I am putting this note.

The roomba model which works in ROS Electric (Stage 3.2.2) and fails in ROS Fuerte and ROS Groovy (Stage 4.1.1) is due to the part of the code in the world file;

define roomba position
(
  size [0.33 0.33 0.1]

  # this block approximates the circular shape of a Roomba
  block( 
    points 16
    point[0] [ 0.225 0.000 ]
    point[1] [ 0.208 0.086 ]
    point[2] [ 0.159 0.159 ]
    point[3] [ 0.086 0.208 ]
    point[4] [ 0.000 0.225 ]
    point[5] [ -0.086 0.208 ]
    point[6] [ -0.159 0.159 ]
    point[7] [ -0.208 0.086 ]
    point[8] [ -0.225 0.000 ]
    point[9] [ -0.208 -0.086 ]
    point[10] [ -0.159 -0.159 ]
    point[11] [ -0.086 -0.208 ]
    point[12] [ -0.000 -0.225 ]
    point[13] [ 0.086 -0.208 ]
    point[14] [ 0.159 -0.159 ]
    point[15] [ 0.208 -0.086 ]
  )
  color "gray50"
)

In Stage 4.1.1 each point is defined by 4 (x,y,z,theta) variables and not 3 and 2. A pioneer robot model (https://github.com/rtv/Stage/blob/master/worlds/pioneer.inc) works fine since each point for constructing the robot is made of 4 variables -- not 3 !

edit flag offensive delete link more

Question Tools

5 followers

Stats

Asked: 2012-05-14 08:39:21 -0600

Seen: 6,719 times

Last updated: Jan 24 '13