Problem with gazebo launch with [/controller_manager/...]

asked 2018-02-22 00:01:54 -0600

MrLacquer gravatar image

updated 2018-02-22 00:54:05 -0600

Hi all ROS users, My system is Linux-mint(16.04), ROS Kinetic 1.12.12

I made a my gazebo launch file:

image description it looks like good work, but there are some problem. That is:

[ INFO] [1519277544.787530619, 0.361000000]: Starting gazebo_ros_control plugin in namespace: /Loaded l_arm_controller_dual
[ERROR] [1519277544.923244209, 0.361000000]: Tried to advertise a service that is already advertised in this node [/controller_manager/list_controllers]
[ERROR] [1519277544.923498348, 0.361000000]: Tried to advertise a service that is already advertised in this node [/controller_manager/list_controller_types]
[ERROR] [1519277544.923590196, 0.361000000]: Tried to advertise a service that is already advertised in this node [/controller_manager/load_controller]
[ERROR] [1519277544.923654401, 0.361000000]: Tried to advertise a service that is already advertised in this node [/controller_manager/unload_controller]
[ERROR] [1519277544.923720687, 0.361000000]: Tried to advertise a service that is already advertised in this node [/controller_manager/switch_controller]
[ERROR] [1519277544.923800040, 0.361000000]: Tried to advertise a service that is already advertised in this node [/controller_manager/reload_controller_libraries]
[ INFO] [1519277544.923897790, 0.361000000]: Loaded gazebo_ros_control.
[INFO] [1519277544.924636, 0.361000]: Controller Spawner: Waiting for service controller_manager/switch_controller

And, the gazebo launch file is: <launch>

<launch>
    <include file="$(find violin_dual_gazebo)/launch/violin_dual_arm_world.launch" />
    <!--include file="$(find violin_dual_gazebo)/launch/controller_utils.launch" /-->
    <include file="$(find violin_dual_gazebo)/launch/dual_arm_joint_state_controller.launch" />
    <include file="$(find violin_dual_gazebo)/launch/dual_arm_l_controller.launch" />
    <include file="$(find violin_dual_gazebo)/launch/dual_arm_r_controller.launch" />
</launch>

Here, violin_dual_world.launch

<launch>
    <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"/>


    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find violin_dual_gazebo)/worlds/violin_dual_arm.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>


    <param name="robot_description" 
            command="$(find xacro)/xacro.py $(find violin_description)/urdf/violin_dual_arm_v1.xacro" />

    <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" 
            args="-urdf -model dual_robot -param robot_description"/>
</launch>

In there, "dual_arm_l_controller.launch" and " dual_arm_r_controller.launch" are as follow: dual_arm_l_controller.launch

<launch>  
    <rosparam file="$(find violin_dual_gazebo)/controller/l_arm_controller_dual.yaml" command="load"/>
    <node name="l_arm_controller_spawner" pkg="controller_manager" type="controller_manager" respawn="false" 
            output="screen" args="spawn l_arm_controller_dual" />
</launch>

dual_arm_r_controller.launch

<launch>
    <rosparam file="$(find violin_dual_gazebo)/controller/r_arm_controller_dual.yaml" command="load"/>
    <node name="r_arm_controller_spawner" pkg="controller_manager" type="controller_manager" respawn="false" 
            output="screen" args="spawn r_arm_controller_dual" />
</launch>

dual_arm_joint_state_controller.launch

<launch>
 <rosparam file="$(find violin_dual_gazebo)/controller/joint_state_controller.yaml" command="load"/>

 <!-- joint_state_controller -->
 <node name="joint_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" 
 output="screen" args="joint_state_controller" />

 <!-- Robot state publisher --> 
 <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" 
 output="screen"/>
</launch>

My goal is based on these gazebo launch, I want to moveit rviz plan --> execute to gazebo simulation like this: https://www.youtube.com/watch?v=1Huhevm2dOM

Please help me.

Thank you.

edit retag flag offensive close merge delete