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

Problem with two topics [closed]

asked 2015-06-10 04:24:39 -0500

Alvaro Salcedo gravatar image

updated 2015-06-10 04:29:43 -0500

Hi Ros users: I have a launch file that it has 2 pkg when I run it. Here it is

<launch>

<!-- these are the arguments you can pass this launch file, for example 
    paused:=true -->
<arg name="paused" default="false" />
<arg name="use_sim_time" default="true" />
<arg name="gui" default="true" />
<arg name="headless" default="false" />
<arg name="debug" default="false" />

<!-- We resume the logic in empty_world.launch, changing only the name of 
    the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find p3dx_gazebo)/ol3_floor/ol3_plano.world" />
    <arg name="debug" value="$(arg debug)" />
    <arg name="gui" value="$(arg gui)" />
    <arg name="paused" value="$(arg paused)" />
    <arg name="use_sim_time" value="$(arg use_sim_time)" />
    <arg name="headless" value="$(arg headless)" />
</include>

<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
    command="$(find xacro)/xacro.py '$(find p3dx_description)/urdf/pioneer3dx.xacro'" />

<!-- Load the second URDF into the ROS Parameter Server -->
<param name="robot_description"
    command="$(find xacro)/xacro.py '$(find p3dx2_description)/urdf/pioneer3dx2.xacro'" />


<!-- Run a python script to the send a service call to gazebo_ros to spawn 
    a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
    respawn="false" output="screen" args="-x 0 -y 0 -z 0 -Y 3.141592654 -urdf -model p3dx -param robot_description" />

<node name="urdf_spawner2" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-x 1 -y 0 -z 0 -Y 3.141592654 -urdf -model p3dx2 -param robot_description"/>

When I run it, everything is ok. But when I type "rostopic list", it just appears the topics from second URDF. does anybody know why?

When I run launch file I can see this:

> [ERROR] [1433927886.731417531,
> 0.532000000]: Tried to advertise a service that is already advertised in
> this node
> [/p3dx2/controller_manager/list_controllers]
> [ERROR] [1433927886.731486254,
> 0.532000000]: Tried to advertise a service that is already advertised in
> this node
> [/p3dx2/controller_manager/list_controller_types]
> [ERROR] [1433927886.731516496,
> 0.532000000]: Tried to advertise a service that is already advertised in
> this node
> [/p3dx2/controller_manager/load_controller]
> [ERROR] [1433927886.731541708,
> 0.532000000]: Tried to advertise a service that is already advertised in
> this node
> [/p3dx2/controller_manager/unload_controller]
> [ERROR] [1433927886.731571112,
> 0.532000000]: Tried to advertise a service that is already advertised in
> this node
> [/p3dx2/controller_manager/switch_controller]
> [ERROR] [1433927886.731596255,
> 0.532000000]: Tried to advertise a service that is already advertised in
> this node
> [/p3dx2/controller_manager/reload_controller_libraries]

Because I want to manage two p3dx independent.

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alvaro Salcedo
close date 2015-06-11 04:42:45.846036

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-10 08:47:40 -0500

kramer gravatar image

updated 2015-06-10 09:47:26 -0500

It looks to me like you're overwriting the robot_description parameter, which appears to be where the root namespace string (p3dx2) is coming from.

Edit: more importantly, you're then loading the same robot_description for both robots (in case that wasn't clear).

edit flag offensive delete link more

Comments

That is the way! thank you so much!

Alvaro Salcedo gravatar image Alvaro Salcedo  ( 2015-06-11 04:42:33 -0500 )edit

Hello, I have similar problem but I don;'t know how to solve this problem according to descriptions which are included above "Edit: more importantly, you're then loading the same robot_description for both robots (in case that wasn't clear).". Could please someone give me more informations ?

M_wasiel13 gravatar image M_wasiel13  ( 2016-04-15 07:54:51 -0500 )edit

There are two 'param name=robot_description' (same name). The 2nd overwrites the first when it is loaded on the param server.

kramer gravatar image kramer  ( 2016-04-17 08:59:48 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-10 04:24:39 -0500

Seen: 767 times

Last updated: Jun 10 '15