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

Best way to repeat simulations

asked 2012-12-25 13:39:25 -0500

whiterose gravatar image

updated 2012-12-26 22:55:24 -0500

Hi all,

I am currently working on a simple fetch and carry scenario in a simulation using ros gazebo. it's an almost complete mobile manipulator system with kinect and laser scanners.

I would like to do something this: 1: launch environment and related objects 2: run the fetch and carry node 3: reset the environment (robot and object back to initial position) 4: iterate 2 and 3 for a few hundred or thousand times.

My question is, is there a good way for repeating the simulations?

EDIT: I guess it's best to describe an example. Say that I would like to run the fetch and carry scenario 100 times. Each time it runs, an object will be thrown on the floor. In that 100 runs, how many times the mobile manipulator collide / bump into the new object.

I'm actually imagining a big for loop that resets the simulation environment and runs the fetch and carry package again. How expensive will that be!!

So, the question is still: What's the best way to repeat simulations.

NB: I wonder how will rosbag help

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-12-26 03:24:03 -0500

updated 2012-12-26 03:26:58 -0500

Maybe there's better solution, but I can give some advice in case you need this in a hurry.

I'll write two launch files, one for environment and related objects(let's call it A.launch), and the other for the fetch and carry node(this one, B.launch).

In a single test, first roslaunch A.launch, then you can roslaunch B.launch and check your work.

After a single test, kill these two processes.Then you can start another test over by roslaunch A.launch and B.launch again.

I am not sure what the purpose is.If you want to do the iteration hundred or thousand of times due to the needs to test the robustness of your node, the method proposed above probably won't satisfy tour need(You'll need to write some scripts to roslaunch the launch files and check if your node works correctly). But if you want to do the iteration again quickly for testing the function of the fetch and carry node while in development stage, this method is quite adequate.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-12-25 13:39:25 -0500

Seen: 585 times

Last updated: Dec 26 '12