0
$\begingroup$

Rosanswers logo

Hi. Sorry for all mistakes, English is not my native language. I managed to load world in gazebo and as far as I can tell from messages in terminal robot description is also loaded without any issue and robot name with all joints, plugin and links is listed in world tab, but no model to be seen in gazebo window.

[INFO] [launch]: All log files can be found below /home/mikita/.ros/log/2022-11-24-12-21-46-325682-ubuntu-30424
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [30426]
[INFO] [spawner.py-2]: process started with pid [30428]
[INFO] [gzserver-3]: process started with pid [30430]
[INFO] [gzclient-4]: process started with pid [30432]
[INFO] [spawn_entity.py-5]: process started with pid [30434]
[robot_state_publisher-1] Parsing robot urdf xml string.
[robot_state_publisher-1] Link base_link had 7 children
[robot_state_publisher-1] Link board had 2 children
[robot_state_publisher-1] Link depth_camera had 1 children
[robot_state_publisher-1] Link depth_camera_link_optical had 0 children
[robot_state_publisher-1] Link rplidar_a2_frame had 0 children
[robot_state_publisher-1] Link front_left_steering had 1 children
[robot_state_publisher-1] Link front_left_wheel had 0 children
[robot_state_publisher-1] Link front_right_steering had 1 children
[robot_state_publisher-1] Link front_right_wheel had 0 children
[robot_state_publisher-1] Link rear_left_steering had 1 children
[robot_state_publisher-1] Link rear_left_wheel had 0 children
[robot_state_publisher-1] Link rear_right_steering had 1 children
[robot_state_publisher-1] Link rear_right_wheel had 0 children
[robot_state_publisher-1] Link stm_back had 3 children
[robot_state_publisher-1] Link ir_sensor_ground_back_0 had 0 children
[robot_state_publisher-1] Link ir_sensor_ground_back_1 had 0 children
[robot_state_publisher-1] Link ir_sensor_pack_back had 5 children
[robot_state_publisher-1] Link ir_sensor_back_0 had 0 children
[robot_state_publisher-1] Link ir_sensor_back_1 had 0 children
[robot_state_publisher-1] Link ir_sensor_back_2 had 0 children
[robot_state_publisher-1] Link ir_sensor_back_3 had 0 children
[robot_state_publisher-1] Link ir_sensor_back_4 had 0 children
[robot_state_publisher-1] Link stm_front had 3 children
[robot_state_publisher-1] Link ir_sensor_ground_front_0 had 0 children
[robot_state_publisher-1] Link ir_sensor_ground_front_1 had 0 children
[robot_state_publisher-1] Link ir_sensor_pack_front had 5 children
[robot_state_publisher-1] Link ir_sensor_front_0 had 0 children
[robot_state_publisher-1] Link ir_sensor_front_1 had 0 children
[robot_state_publisher-1] Link ir_sensor_front_2 had 0 children
[robot_state_publisher-1] Link ir_sensor_front_3 had 0 children
[robot_state_publisher-1] Link ir_sensor_front_4 had 0 children
[robot_state_publisher-1] [INFO] [1669321306.678753978] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1669321306.678913614] [robot_state_publisher]: got segment board
[robot_state_publisher-1] [INFO] [1669321306.678929934] [robot_state_publisher]: got segment depth_camera
[robot_state_publisher-1] [INFO] [1669321306.678938199] [robot_state_publisher]: got segment depth_camera_link_optical
[robot_state_publisher-1] [INFO] [1669321306.678945528] [robot_state_publisher]: got segment front_left_steering
[robot_state_publisher-1] [INFO] [1669321306.678952716] [robot_state_publisher]: got segment front_left_wheel
[robot_state_publisher-1] [INFO] [1669321306.678959930] [robot_state_publisher]: got segment front_right_steering
[robot_state_publisher-1] [INFO] [1669321306.678967088] [robot_state_publisher]: got segment front_right_wheel
[robot_state_publisher-1] [INFO] [1669321306.678974402] [robot_state_publisher]: got segment ir_sensor_back_0
[robot_state_publisher-1] [INFO] [1669321306.678981308] [robot_state_publisher]: got segment ir_sensor_back_1
[robot_state_publisher-1] [INFO] [1669321306.678988170] [robot_state_publisher]: got segment ir_sensor_back_2
[robot_state_publisher-1] [INFO] [1669321306.678995042] [robot_state_publisher]: got segment ir_sensor_back_3
[robot_state_publisher-1] [INFO] [1669321306.679001910] [robot_state_publisher]: got segment ir_sensor_back_4
[robot_state_publisher-1] [INFO] [1669321306.679008919] [robot_state_publisher]: got segment ir_sensor_front_0
[robot_state_publisher-1] [INFO] [1669321306.679015705] [robot_state_publisher]: got segment ir_sensor_front_1
[robot_state_publisher-1] [INFO] [1669321306.679022495] [robot_state_publisher]: got segment ir_sensor_front_2
[robot_state_publisher-1] [INFO] [1669321306.679029833] [robot_state_publisher]: got segment ir_sensor_front_3
[robot_state_publisher-1] [INFO] [1669321306.679036640] [robot_state_publisher]: got segment ir_sensor_front_4
[robot_state_publisher-1] [INFO] [1669321306.679043418] [robot_state_publisher]: got segment ir_sensor_ground_back_0
[robot_state_publisher-1] [INFO] [1669321306.679050338] [robot_state_publisher]: got segment ir_sensor_ground_back_1
[robot_state_publisher-1] [INFO] [1669321306.679057817] [robot_state_publisher]: got segment ir_sensor_ground_front_0
[robot_state_publisher-1] [INFO] [1669321306.679064665] [robot_state_publisher]: got segment ir_sensor_ground_front_1
[robot_state_publisher-1] [INFO] [1669321306.679071480] [robot_state_publisher]: got segment ir_sensor_pack_back
[robot_state_publisher-1] [INFO] [1669321306.679078453] [robot_state_publisher]: got segment ir_sensor_pack_front
[robot_state_publisher-1] [INFO] [1669321306.679085471] [robot_state_publisher]: got segment rear_left_steering
[robot_state_publisher-1] [INFO] [1669321306.679092411] [robot_state_publisher]: got segment rear_left_wheel
[robot_state_publisher-1] [INFO] [1669321306.679099810] [robot_state_publisher]: got segment rear_right_steering
[robot_state_publisher-1] [INFO] [1669321306.679106837] [robot_state_publisher]: got segment rear_right_wheel
[robot_state_publisher-1] [INFO] [1669321306.679113695] [robot_state_publisher]: got segment rplidar_a2_frame
[robot_state_publisher-1] [INFO] [1669321306.679120998] [robot_state_publisher]: got segment rs_t265_pose_frame
[robot_state_publisher-1] [INFO] [1669321306.679127840] [robot_state_publisher]: got segment stm_back
[robot_state_publisher-1] [INFO] [1669321306.679134940] [robot_state_publisher]: got segment stm_front
[spawner.py-2] [INFO] [1669321307.001865035] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawn_entity.py-5] [INFO] [1669321307.239212058] [spawn_husky]: Spawn Entity started
[spawn_entity.py-5] [INFO] [1669321307.239865322] [spawn_husky]: Loading entity published on topic robot_description
[spawn_entity.py-5] [INFO] [1669321307.242287340] [spawn_husky]: Waiting for entity xml on robot_description
[spawn_entity.py-5] [INFO] [1669321307.259608563] [spawn_husky]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-5] [INFO] [1669321307.260107698] [spawn_husky]: Waiting for service /spawn_entity
[gzserver-3] [INFO] [1669321308.517755527] [gazebo_ros_node]: ROS was initialized without arguments.
[spawn_entity.py-5] [INFO] [1669321308.769025346] [spawn_husky]: Calling service /spawn_entity
[spawner.py-2] [INFO] [1669321309.016166908] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[gzserver-3] [INFO] [1669321309.538614741] [camera_controller]: Publishing camera info to [/minicar/camera/camera_info]
[gzserver-3] [INFO] [1669321309.564746072] [depth_camera_controller]: Publishing camera info to [/minicar/camera/depth/camera_info]
[gzserver-3] [INFO] [1669321309.566462159] [depth_camera_controller]: Publishing depth camera info to [/minicar/camera/depth/depth/camera_info]
[gzserver-3] [INFO] [1669321309.567765923] [depth_camera_controller]: Publishing pointcloud to [/minicar/camera/depth/points]
[gzserver-3] [WARN] [1669321309.866834068] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321309.878659208] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321309.897202736] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321309.911094225] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321309.937911380] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321309.958253337] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321309.990086422] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321310.022248107] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321310.047210297] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321310.078033574] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321310.102946786] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321310.127462784] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[gzserver-3] [WARN] [1669321310.175710796] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[spawn_entity.py-5] [INFO] [1669321310.231455510] [spawn_husky]: Spawn status: SpawnEntity: Successfully spawned entity [minicar]
[INFO] [spawn_entity.py-5]: process has finished cleanly [pid 30434]
[gzserver-3] [INFO] [1669321310.375428377] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-3] [INFO] [1669321310.392089643] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /
[gzserver-3] [INFO] [1669321310.392223097] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-3] [INFO] [1669321310.392309359] [gazebo_ros2_control]: Loading parameter file /home/mikita/ros2_ws/install/minicar_control/share/minicar_control/config/control.yaml
[gzserver-3] 
[gzserver-3] [INFO] [1669321310.406510343] [gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-3] [INFO] [1669321310.415515714] [gazebo_ros2_control]: Recieved urdf from param server, parsing...
[gzserver-3] [ERROR] [1669321310.420717058] [gazebo_ros2_control]: Error parsing URDF in gazebo_ros2_control plugin, plugin not active : no attribute name in ros2_control tag
[spawner.py-2] [INFO] [1669321311.033782844] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-2] [INFO] [1669321313.050987270] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-2] [INFO] [1669321315.067009109] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-2] [ERROR] [1669321317.086227286] [spawner_joint_state_broadcaster]: Controller manager not available
[ERROR] [spawner.py-2]: process has died [pid 30428, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster -c /controller_manager --ros-args'].
[INFO] [spawner.py-6]: process started with pid [30593]
[spawner.py-6] [INFO] [1669321317.558955885] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321319.576272847] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321321.593130100] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321323.608227359] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321325.625707465] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [ERROR] [1669321327.644283473] [spawner_minicar_controller]: Controller manager not available
[ERROR] [spawner.py-6]: process has died [pid 30593, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py minicar_controller -c /controller_manager --ros-args'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-1] [INFO] [1669321412.145160525] [rclcpp]: signal_handler(signal_value=2)
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 30426]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) again, ignoring...
[INFO] [gzclient-4]: process has finished cleanly [pid 30432]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) again, ignoring...
[ERROR] [gzserver-3]: process has died [pid 30430, exit code -11, cmd 'gzserver -s libgazebo_ros_factory.so /home/mikita/ros2_ws/install/minicar_simulator/share/minicar_simulator/worlds/test_walls.world'].

This is my launch file for launching gazebo:

import os

import xacro

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, ExecuteProcess, RegisterEventHandler
from launch.event_handlers import OnProcessExit
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

from ament_index_python.packages import get_package_share_directory

arg = [
    DeclareLaunchArgument('world_path', default_value='',
                        description='The world path, by default is empty.world'),
]


def generate_launch_description():

    # Launch args
    world_path = LaunchConfiguration('world_path')
    package_dir = os.path.join(get_package_share_directory('minicar_simulator'))
    doc = os.path.join(package_dir, 'urdf', 'minicar.gazebo.xacro')
    xacro_file = xacro.parse(open(doc))
    xacro.process_doc(xacro_file)

    robot_description = {"robot_description": xacro_file.toxml()}

    spawn_minicar_velocity_controller = Node(
        package='controller_manager',
        executable='spawner.py',
        arguments=['minicar_controller', '-c', '/controller_manager'],
        output='screen',
    )

    node_robot_state_publisher = Node(
        package="robot_state_publisher",
        executable="robot_state_publisher",
        output="screen",
        parameters=[{'use_sim_time': True}, robot_description],
    )

    spawn_joint_state_broadcaster = Node(
        package='controller_manager',
        executable='spawner.py',
        arguments=['joint_state_broadcaster', '-c', '/controller_manager'],
        output='screen',
    )
    diffdrive_controller_spawn_callback = RegisterEventHandler(
        event_handler=OnProcessExit(
            target_action=spawn_joint_state_broadcaster,
            on_exit=[spawn_minicar_velocity_controller],
        )
    )

    gzserver = ExecuteProcess(
        cmd=['gzserver',
            '-s', 'libgazebo_ros_factory.so',
            world_path],
        output='screen',
    )

    gzclient = ExecuteProcess(
        cmd=['gzclient'],
        output='screen',
    )

    spawn_robot = Node(
        package='gazebo_ros',
        executable='spawn_entity.py',
        arguments=['-entity',
                'minicar',
                '-topic',
                'robot_description'],
        output='screen',
    )
    ld = LaunchDescription(arg)
    ld.add_action(node_robot_state_publisher)
    ld.add_action(spawn_joint_state_broadcaster)
    ld.add_action(diffdrive_controller_spawn_callback)
    ld.add_action(gzserver)
    ld.add_action(gzclient)
    ld.add_action(spawn_robot)

    return ld
    

and aagazebo_world.launch.py file:

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare


def generate_launch_description():
    
    world_file = PathJoinSubstitution(
        [FindPackageShare("minicar_simulator"),
        "worlds",
        "test_walls.world"],
    )

    gazebo_launch = PathJoinSubstitution(
        [FindPackageShare("minicar_simulator"),
        "launch",
        "aagazebo.launch.py"],
    )

    gazebo_sim = IncludeLaunchDescription(
        PythonLaunchDescriptionSource([gazebo_launch]),
        launch_arguments={'world_path': world_file}.items(),
    )

    ld = LaunchDescription()
    ld.add_action(gazebo_sim)

    return ld

Appreciate any help.


Originally posted by Edvard on ROS Answers with karma: 95 on 2022-11-24

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Hello,

I gazebo with ros, you have to read all message logs into the terminal you will get the error messages.

In your case,

[gzserver-3] [ERROR] [1669321310.420717058] [gazebo_ros2_control]: Error parsing URDF in gazebo_ros2_control plugin, plugin not active : no attribute name in ros2_control tag
[spawner.py-2] [INFO] [1669321311.033782844] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-2] [INFO] [1669321313.050987270] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-2] [INFO] [1669321315.067009109] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-2] [ERROR] [1669321317.086227286] [spawner_joint_state_broadcaster]: Controller manager not available
[ERROR] [spawner.py-2]: process has died [pid 30428, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster -c /controller_manager --ros-args'].
[INFO] [spawner.py-6]: process started with pid [30593]
[spawner.py-6] [INFO] [1669321317.558955885] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321319.576272847] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321321.593130100] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321323.608227359] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1669321325.625707465] [spawner_minicar_controller]: Waiting for /controller_manager services
[spawner.py-6] [ERROR] [1669321327.644283473] [spawner_minicar_controller]: Controller manager not available
[ERROR] [spawner.py-6]: process has died [pid 30593, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py minicar_controller -c /controller_manager --ros-args'].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robot_state_publisher-1] [INFO] [1669321412.145160525] [rclcpp]: signal_handler(signal_value=2)
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 30426]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) again, ignoring...
[INFO] [gzclient-4]: process has finished cleanly [pid 30432]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) again, ignoring...
[ERROR] [gzserver-3]: process has died [pid 30430, exit code -11, cmd 'gzserver -s libgazebo_ros_factory.so /home/mikita/ros2_ws/install/minicar_simulator/share/minicar_simulator/worlds/test_walls.world'].

This are your error messages.

I think you need to have a look into your URDF file and in your plugin code you are missing the argument name ros2_control.

<plugin filename="file_name.so" name="gazebo_ros2_control">
      # You need to add tag over here. 
</plugin>

Originally posted by Ranjit Kathiriya with karma: 1622 on 2022-11-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Edvard on 2022-11-24:
Sorry, I didn't notice that. Thank you very much for your help. Everything is loading now.

Comment by Ranjit Kathiriya on 2022-11-24:
That's great.

$\endgroup$
0
$\begingroup$

Before the gazebo starts the process has died and returned with -11

[ERROR] [gzserver-3]: process has died [pid 38064, exit code -11, cmd 'gzserver -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so'].

For this error,i removed the shared library extension(.so) from this code

to this

<plugin filename="libgazebo_ros2_control" name="gazebo_ros2_control"> 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.