Controller Spawner couldn't find the expected controller_manager

Hi,

I’m doing the micro project. I want to start from the pi_robot_v2.urdf, I have created the launch files for the controllers, spawn the Gazebo model, but it shows the following error:

[WARN] [1637960432.007185, 0.000000]: Controller Spawner couldn’t find the expected controller_manager ROS interface.

In addition, it does not show the Gazebo model.

Please could you help me?

Hi, this could be for some error in the launch file. Could you share here the code or at least the commands to reproduce your issue?

Hello!
Any solution of this problem mentioned above? sharing my launch file


Also i am having the problem that if model spawn in gazebo environment , how i will move its joints???

Hi @misbahsuhail123 ,

To spawn the model in Gazebo, you first need to ensure that all XACRO files corresponding to your custom humanoid robot are located in box_human_description/robot. Alternatively, you can use the files provided in the solution here.
When using your launch file, I suggest using box_human_description/launch/box_human_spawn_xacro.launch (given in the project description) since XACRO files are used for robot description in this context. Therefore, you should include box_human_spawn_xacro.launch instead of box_human_spawn.launch :

<include file="$(find box_human_description)/launch/box_human_spawn_xacro.launch">

The correct launch /box_human_spawn_xacro.launch should appear as follows:

<launch>
	
	<arg name="x" default="0.0" />
    <arg name="y" default="0.0" />
    <arg name="z" default="0.0" />
    <arg name="roll" default="0"/>
    <arg name="pitch" default="0"/>
    <arg name="yaw" default="0.0" />

	<arg name="model" default="$(find box_human_description)/robot/box_human.xacro"/>  
	<arg name="robot_name" default="boxhuman1"/>

	<group ns="$(arg robot_name)">
        
        <param name="robot_description" command="cat $(arg model)" />
		<!-- 
		Converts the XACRO robot information to UDRF and use it as a robot_description parameter
		-->
		<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model) x_pos:=$(arg x) y_pos:=$(arg y) z_pos:=$(arg z) yaw_pos:=$(arg yaw) robot_name:=$(arg robot_name)" />
        
		<node name="robot_state_publisher_box_human" pkg="robot_state_publisher" type="robot_state_publisher"
			respawn="false" output="screen">
			<param name="publish_frequency" type="double" value="5.0" />
		</node>

		<node name="urdf_spawner"
				pkg="gazebo_ros"
				type="spawn_model"
				respawn="false"
				output="screen"
				args="-urdf -model $(arg robot_name) -param robot_description"/>
    </group>
</launch>

With this configuration, the humanoid robot should spawn correctly.

Finally, to move the joints, you should:

  • Write the YAML file for controllers

  • Spawn controlers

  • Move joints by publishing in commands topics using rqt_gui