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

spawning two similar models at the a time

asked 2022-08-31 13:40:44 -0600

M.IR gravatar image

Hi, I have an urgent question and you can't imagine how priceless your answers are. Here it is: I have written a .xacro model and want to spawn two instance of the model in gazebo simultaneously. How can I make it?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-08-31 20:13:23 -0600

tomarRobin gravatar image

updated 2022-09-01 18:15:00 -0600

You can run two instances of your node which spawns the robot under two namespaces.

Edit 1 : This can be done in multiple ways. The best way is to make a roslaunch file and add nodes in there. By using the “ns” attribute you can define the namespace. You can find details here

Example:

<launch>
    <node pkg=“…” type=”…” name=”…”  ns=”…”/>
</launch>
edit flag offensive delete link more

Comments

Thanks, of course I should do so, but how?

M.IR gravatar image M.IR  ( 2022-09-01 17:06:19 -0600 )edit

unfortunately it didn't work. I tried another way represented link text, it did not work as well

M.IR gravatar image M.IR  ( 2022-09-02 06:46:23 -0600 )edit

Can you also check out this answer link

tomarRobin gravatar image tomarRobin  ( 2022-09-02 06:56:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-08-31 13:40:44 -0600

Seen: 130 times

Last updated: Sep 01 '22