I'm using py launch files for spawing a robot in Gazebo environment. System: ROS2-humble After the robot description files(xacro) are launched the ODOM, lidar and GPS (all are gazebo plugins) topics are not getting published. Initial launch file - here follows
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.conditions import IfCondition
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
pkg_eve_car_gazebo = get_package_share_directory('eve_car_gazebo')
pkg_eve_car_description = get_package_share_directory('eve_car_description')
# Sart World
start_world = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_eve_car_gazebo, 'launch', 'start_world_launch.py'),
)
)
spawn_robot_world = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_eve_car_description, 'launch', 'spawn_robot_launch_v4.launch.py'),
)
)
return LaunchDescription([
start_world,
spawn_robot_world
])
[ERROR] [gzserver-1]: process has died [pid 19207, exit code 255, cmd 'gzserver /home/david/eve/install/eve_car_gazebo/share/eve_car_gazebo/worlds/eve_bot_empty.world -slibgazebo_ros_init.so -slibgazebo_ros_factory.so -slibgazebo_ros_force_system.so']
this error occurs when I launch. but the robot physics loads perfectly
I tried to rebuild and reinstall everything. But still no luck!