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

Custom simulation using Stage

asked 2011-03-08 11:39:20 -0500

Sagnik gravatar image

updated 2011-03-08 11:51:28 -0500

Eric Perko gravatar image

Hi,

I want to simulate a custom robot using ROS Diamondback. I figured that Stage is the package I should be using for simulation. I have read up the documentation on setting up a .world file for my simulation and have a world file with a robot and the intended simulation arena. However I am stuck as to how to proceed further. I have some code which does controlling/path planning for my robot, but how do I integrate the code with Stage ?

Could someone point me to some documentation / How-tos on this ?

Thanks, Sagnik

edit retag flag offensive close merge delete

Comments

@Sagnik : Have a look, this is primarily gazebo but there is some information on how to use stage/stageros with world files - http://mobotica.blogspot.com/2011/09/using-gazebo.html
Arkapravo gravatar image Arkapravo  ( 2011-10-17 03:45:12 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
2

answered 2011-03-08 11:59:08 -0500

Eric Perko gravatar image

A good place to start would be to read over the Stage ROS API available on the stage wiki page. In particular, note that Stage publishes an odom topic for odometry information, a base_scan topic for planar laser scans and subscribes to the cmd_vel topic for velocity commands. Stageros also outputs the tf information required to transform laser scans into the odometry frame.

An important thing to keep in mind is that Stage is not a full-on physics simulation so code that does low-level control may not be appropriate to simulate if it is dependent on physical properties of your platform (I'm referring to things like control loops or PIDs that may need gains tuned to the particular robot platform).

edit flag offensive delete link more
0

answered 2011-03-10 05:54:28 -0500

Sagnik gravatar image

Hi Guys,

I wanted to modify stageros.cpp in a very minor way. I wanted the /odom topic to be published under a different name, so I went ahead and changed the string at the top of the file to "canbus". After rosmaking stage, it seg faults at startup. Even when I change the string "canbus" back to "odom" and rosmake it once again, it still seg faults.

I checked the seg fault issue of stage listed on the stage page on the ros site, but thats not the problem in my case.

Where am I going wrong ?

Thanks, Sagnik

edit flag offensive delete link more

Comments

1
@Sagnik: This would probably be better asked as a new question. Also, a backtrace would be very helpful. See http://www.ros.org/wiki/roslaunch/Tutorials/Roslaunch%20Nodes%20in%20Valgrind%20or%20GDB for how to launch a node in GDB. When it crashes, type `bt` and then include the backtrace.
Eric Perko gravatar image Eric Perko  ( 2011-03-10 05:58:26 -0500 )edit
That problem can be solved by remapping the topic name. See Remapping Arguments in the ROS wiki.
joq gravatar image joq  ( 2011-03-10 13:07:11 -0500 )edit
Eric Perko gravatar image Eric Perko  ( 2011-03-10 13:08:27 -0500 )edit
0

answered 2011-03-08 14:30:43 -0500

joq gravatar image

I had a similar problem with the ART autonomous car. I solved it by making my own modified version of stageros.cpp, specific to our vehicle (simulator_art).

There may be a better solution, but that worked OK so far. The only problem has been updating it for new versions of stage. But, that is due to stage's lack of backwards compatibility. If you need a stable interface, use a different simulator.

edit flag offensive delete link more

Comments

Are there any other simulation packages or options other than Stage that I can take a look at before diving in ?
Sagnik gravatar image Sagnik  ( 2011-03-09 10:44:42 -0500 )edit
There is also Gazebo, but it takes more work to get up and running than Stage.
Eric Perko gravatar image Eric Perko  ( 2011-03-09 12:48:22 -0500 )edit
We use OpenRAVE, it's meant to be a planning environment, but works really well as a simulator. We have done an autonomous sub, UAV, skid-steer loader, car-like robot and an iCreate.
Nick H gravatar image Nick H  ( 2011-03-10 09:49:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2011-03-08 11:39:20 -0500

Seen: 1,796 times

Last updated: Mar 10 '11