Ask Your Question
0

Run simulation and real system simultaneously?

asked 2019-05-13 02:45:53 -0500

Hendrik Wiese gravatar image

Hi everyone

Is it possible to run a Gazebo simulation of, lets say, a UR5 robot and the driver for the real UR5 simultaneously in different namespaces? I need to be able to run a trajectory in simulation first for testing, and then on the real system. I don't want to have to start and stop the simulation and the driver alternatingly over and over again.

Thanks

Hendrik

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-05-13 02:57:30 -0500

gvdhoorn gravatar image

updated 2019-05-13 03:08:24 -0500

Sure, why not?


That is probably not the answer you were looking for, but your question, as you currently state it, doesn't seem to ask for any specifics. You also don't tell us whether you're expecting any specific problems setting something like that up, so I can't be more specific in my answer.

edit flag offensive delete link more

Comments

The problem is that I seem to have a rostopic name clash between the simulation and the real system. I'm trying to put the real system and the gazebo simulation in their own namespaces. It works for the real system but the simulation does not start correctly when put in a namespace. It seems like it still tries to reach /gazebo/spawn_urdf_model service without the namespace prefix. The other services seemingly correctly have the namespace prefix.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2019-05-13 03:13:11 -0500 )edit
1

It seems like it still tries to reach /gazebo/spawn_urdf_model service without the namespace prefix.

this is a very specific problem that would've been good to mention in your OP.

In any case: according to the codespawn_model should be able to deal with namespaces. Could you perhaps show a snippet of your .launch file(s) that show (roughly) how you start your simulation?

gvdhoorn gravatar image gvdhoorn  ( 2019-05-13 03:29:21 -0500 )edit

I'm sorry, yes, I should have mentioned it. I'm using the ur_gazebo package, completely unmodified. The only thing I'm doing is launching the simulation by ROS_NAMESPACE=simulation roslaunch ur_gazebo ur5.launch. So from my point of view nothing special.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2019-05-13 03:42:11 -0500 )edit

I'd try with a wrapper-.launch file that uses a group with a ns attribute and includes the launch files that you want to start in a different namespace. It might not change things, but it's a slightly more reproducable -- and shareable -- setup.

gvdhoorn gravatar image gvdhoorn  ( 2019-05-13 04:34:16 -0500 )edit

Alright, I'll give it a shot. For the acute situation though I have now performed the moves on the real robot, drastically slowed down in order to be able to react in the case of an imminent collision. If a run turned out working without collision, I executed the trajectory at full speed. A bit of a risk, but no issues were had. Even without using the simulation.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2019-05-13 09:13:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-05-13 02:45:53 -0500

Seen: 63 times

Last updated: May 13 '19