ros2_control: No parameter file provided. Configuration might be wrong. failed to parse input yaml file(s)

asked 2023-07-23 03:21:31 -0500

KalaDaku gravatar image

updated 2023-07-23 09:19:04 -0500

Hello. I am trying to build a 4 wheel differential drive robot. But i am getting error when using ros2_control.

Version: Ros2 Foxy

Terminal Output

[robot_state_publisher-1] Parsing robot urdf xml string.

[robot_state_publisher-1] Link chassis had 0 children

[robot_state_publisher-1] Link left_back_wheel had 0 children

[robot_state_publisher-1] Link left_front_wheel had 0 children

[robot_state_publisher-1] Link right_back_wheel had 0 children

[robot_state_publisher-1] Link right_front_wheel had 0 children

".yaml" Config File for Ros2 Control

controller_manager: ros__parameters: update_rate: 30 use_sim_time: true

diff_cont:
  type: diff_drive_controller/DiffDriveController

joint_broad:
  type: joint_state_broadcaster/JointStateBroadcaster

diff_cont: ros__parameters:

publish_rate: 50.0

base_frame_id: base_link

left_wheel_names: ['left_front_wheel_joint', 'left_back_wheel_joint']
right_wheel_names: ['right_front_wheel_joint', 'right_back_wheel_joint']
wheel_separation: 0.36
wheel_radius: 0.1

use_stamped_vel: false

Main URDF File --> robot_core.xacro

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro">xmlns:xacro="http://www.ros.org/wiki/..." ><="" p=""> </robot>

<xacro:include filename="inertial_macros.xacro"/>

<material name="white">
    <color rgba="1 1 1 1" />
</material>

<material name="orange">
    <color rgba="1 0.3 0.1 1" />
</material>

<material name="blue">
    <color rgba="0.2 0.2 1 1" />
</material>

<material name="black">
    <color rgba="0 0 0 1" />
</material>


<!-- BASE LINK -->
<link name="base_link">

</link>


<!-- CHASSI LINK -->
<joint name="chassis_joint" type="fixed">
    <parent link="base_link"/>
    <child link="chassis"/>
    <origin xyz="-0.1 0 0"/>
</joint>

<link name="chassis">
    <visual>
        <!-- <origin xyz="0.15 0 0.075"/>   # This line is used to move the chasis relative to its link -->
        <geometry>
            <box size="0.5 0.3 0.05"/>
        </geometry>
        <material name="white"/>
    </visual>

    <collision>
        <!-- <origin xyz="0.3 0 0.075"/>   0.15 0 0.075 -->
        <geometry>
            <box size="0.5 0.3 0.3"/>
        </geometry>
    </collision>

    <xacro:inertial_box mass="0.5" x="0.5" y="0.3" z="0.05">
        <origin xyz="0 0 0" rpy="0 0 0"/>
    </xacro:inertial_box>
</link>

<gazebo reference="chassis">
    <material>Gazebo/Orange</material>
</gazebo>

<!-- LEFT FRONT WHEEL LINK -->
<joint name="left_front_wheel_joint" type="continuous">
    <parent link="base_link"/>
    <child link="left_front_wheel"/>        
    <origin xyz="0.15 0.18 0" rpy="-${pi/2} 0 0"/>
    <axis xyz="0 0 1"/>
</joint>

<link name="left_front_wheel">
    <visual>
        <geometry>
            <cylinder radius="0.1" length="0.04"/>
        </geometry>
        <material name="blue"/>
    </visual>
    <collision>
        <geometry>
            <cylinder radius="0.1" length="0.04"/>
        </geometry>
    </collision>

    <xacro:inertial_cylinder mass="0.1" length="0.04" radius="0.1">
        <origin xyz="0 0 0" rpy="0 0 0"/>
    </xacro:inertial_cylinder>
</link>

<gazebo reference="left_front_wheel">
    <material>Gazebo/Blue</material>
</gazebo>

<!-- RIGHT FRONT WHEEL LINK -->
<joint name="right_front_wheel_joint" type="continuous">
    <parent link="base_link"/>
    <child link="right_front_wheel"/>        
    <origin xyz="0.15 -0.18 0" rpy="${pi/2} 0 0"/>
    <axis xyz="0 0 -1"/>
</joint>

<link ...
(more)
edit retag flag offensive close merge delete

Comments

Can you include the full terminal output which shows the command you ran and the error?

jdlangs gravatar image jdlangs  ( 2023-07-24 11:56:04 -0500 )edit

i added full terminal output. Seems like it got truncated due to excess content. But The issue is resolved not. It was just a typo in parameters tag. But now the robot is not moving left or right in gazebo, although it is moving forward and backward. The robot is moving completely fine in rviz2(forward, backward, left, right).

Thanks

KalaDaku gravatar image KalaDaku  ( 2023-07-27 11:09:57 -0500 )edit