0
$\begingroup$

Rosanswers logo

Can I run simulation in gazebo and all of them are on the PR2 robot? My scenario is that when a robot generates a plan, it might be safer if it can simulate first in its "mind" before execution. After it gets a successful plan, we can apply the plan to the real robot and the physical world. If it fails in the physical world, then we can modify the world model in the simulator and finally build up a good-enough world model.

But I found that most of the nodes and topics generated when I roslaunch pr2_empty_world.launch, will duplicate with those in the robot. So once I launch it in the robot, it will replace the ones belong to the robot and cause lots of errors.

So my question is how to run the simulation in PR2? When we get the good plan, how to synchronize the simulator and the robot? Or if there is a better approach to do the simulation in robot?


Originally posted by Albert K on ROS Answers with karma: 301 on 2012-11-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I would run gazebo and the real robot on two different roscore instances. That's probably the easiest solution. The hardest part is probably to allow your planning node to access both cores but you can use some multimaster approach for that.

Alternatively, you can try to run all gazebo-related nodes in a separate namespace but that's definitely not trivial because you need to make sure that topics such as tf and joint_states are put in the namespace as well. Have a look at roslaunch's <group> tag.


Originally posted by Lorenz with karma: 22731 on 2012-11-20

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Albert K on 2012-11-20:
Any recommended package for multimaster? I've checked ros.org and the related package seemed to be experimental. And the only package I can install using apt-get is ros-fuerte-multimaster-experimental. Any suggestion? Thanks~

Comment by Lorenz on 2012-11-20:
There were a few questions on that topic here on answers.ros.org. Maybe you find a few good answers there. Unfortunately, I didn't have a chance to have a closer look at that topic though.

$\endgroup$

Your Answer

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