Gazebo doesnt launch world properly

asked 2022-11-26 13:00:42 -0500

oanli gravatar image

First i created a simulation package and a roboter (urdf) according this website: https://automaticaddison.com/how-to-b...

Then i created my own world in gazebo.

If i start everything from a launch file, the roboter gets spawned and falls down. The world is not getting load aswell.

<?xml version="1.0"?>
<launch>

    <arg name="world_file" default="$(find asap)/worlds/model.world"/>  

    <!-- Parameter -->

    <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"/>
    <arg name="extra_gazebo_args" default="--verbose"/>

    <!-- Gazebo -->

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(arg world_file)"/>
        <arg name="paused" value="$(arg paused)"/>
        <arg name="use_sim_time" value="$(arg use_sim_time)"/>
        <arg name="gui" value="$(arg gui)"/>
        <arg name="headless" value="$(arg headless)"/>
        <arg name="debug" value="$(arg debug)"/>
        <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args)"/>
    </include>

    <param name="robot_description" textfile="/home/oanli/catkin_ws/src/asap/urdf/mobile_manipulator.urdf" />
    <node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model mobile_manipulator" />

    <rosparam command="load" file="/home/oanli/catkin_ws/src/asap/config/arm_control.yaml" />
    <node name="arm_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn arm_controller" respawn="false" output="screen"/>

    <rosparam command="load" file="/home/oanli/catkin_ws/src/asap/config/joint_state_controller.yaml" />
    <node name="joint_state_controller_spawner" pkg="controller_manager" type="controller_manager" args="spawn joint_state_controller" respawn="false" output="screen"/>

    <rosparam command="load" file="/home/oanli/catkin_ws/src/asap/config/control.yaml" />
    <node name="base_controller_spawner" pkg="controller_manager" type="spawner" args="robot_base_joint_publisher robot_base_velocity_controller"/>

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen"/>

</launch>

The error message:

...
    [DEBUG] [1669488363.724492385, 0.375000000]: DiffDrive(ns = //): <odometrySource> = world := 1
    [DEBUG] [1669488363.724519380, 0.375000000]: DiffDrive(ns = //): <leftJoint> = front_left_wheel_joint, rear_left_wheel_joint
    [Err] [gazebo_ros_utils.cpp:135] EXCEPTION: DiffDrive(ns = //): couldn't get wheel hinge joint named front_left_wheel_joint, rear_left_wheel_joint
    [Err] [Model.cc:1160] Exception occured in the Load function of plugin with name[diff_drive_controller] and filename[libgazebo_ros_diff_drive.so]. This plugin will not run.
    [DEBUG] [1669488363.734927540, 0.386000000]: Trying to publish message of type [sensor_msgs/JointState/3066dcd76a6cfaef579bd0f34173e9fd] on a publisher with type [sensor_msgs/JointState/3066dcd76a6cfaef579bd0f34173e9fd]
    Loaded 'joint_state_controller'
    Started ['joint_state_controller'] successfully
    Loaded 'arm_controller'
    Started ['arm_controller'] successfully
    [ INFO] [1669488363.872978305, 0.521000000]: Controller state will be published at 50Hz.
...
edit retag flag offensive close merge delete