0
$\begingroup$

Rosanswers logo

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


Originally posted by whiterose on ROS Answers with karma: 148 on 2012-12-25

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Po-Jen Lai with karma: 1371 on 2012-12-26

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.