[ROS2 Control + Gazebo Ignition] Issue with loading libgz_ros2_control-system.so
Hi everyone,
I’m using Ubuntu 22.04 (Jammy) with ROS 2 Humble, and I’ve installed Gazebo Ignition (the version released for Humble).
I’m quite new to the ROS ecosystem — and even newer to ros2_control
— so I could really use some help.
Setup Summary
I installed both versions of the control plugin (gz and ign) since I wasn’t sure which was correct:
libgz_ros2_control-system.so
libign_ros2_control-system.so
In my robot’s URDF, I have the following plugin section:
<gazebo>
<plugin name="gz_ros2_control::GazeboSystem" filename="libgz_ros2_control-system.so">
<ros>
<remapping>tf:=tf</remapping>
<remapping>tf_static:=tf_static</remapping>
</ros>
<parameters>$(find control_bringup)/share/control_bringup/config/xinius_control.yaml</parameters>
</plugin>
</gazebo>
I’m not 100% sure the plugin line is correct — that’s one of my concerns.
Launch File
Here’s the relevant part of my launch.py
that starts the robot:
def generate_launch_description():
pkg_share = FindPackageShare('control_bringup').find('control_bringup')
urdf_path = os.path.join(pkg_share, 'description', 'Xinius.urdf')
controller_config = os.path.join(pkg_share, 'config', 'xinius_control.yaml')
with open(urdf_path, 'r') as infp:
robot_description_content = infp.read()
return LaunchDescription([
Node(
package='robot_state_publisher',
executable='robot_state_publisher',
name='robot_state_publisher',
parameters=[{'robot_description': robot_description_content}],
output='screen'
),
Node(
package='controller_manager',
executable='ros2_control_node',
parameters=[
{'robot_description': robot_description_content},
controller_config
],
output='screen'
),
ExecuteProcess(
cmd=['ign', 'gazebo', '-r', 'empty.sdf', '--force-version', '6'],
output='screen'
),
])
Error
When I launch the system and spawn my robot, I get the following error:
[ERROR] [ros2_control_node-2]: process has died [pid 8121, exit code -6, ...]
[ign-3] libEGL warning: MESA-LOADER: failed to open vgem
[ign-3] libEGL warning: NEEDS EXTENSION: falling back to kms_swrast
[ign-3] [Err] [SystemLoader.cc:94] Failed to load system plugin [libgz_ros2_control-system.so] : couldn't find shared library.
Configuration File
Here’s my YAML file, which I believe is correctly formatted:
xinius_geometry:
ros__parameters:
wheel_radius: 0.050
wheels_separation: 0.678
wheels_separation_multiplier: 1.0
left_wheel_radius_multiplier: 1.0
right_wheel_radius_multiplier: 1.0
diff_drive:
ros__parameters:
odom_frame_id: odom
robot_frame_id: base_footprint
translation_covariance_base: 0.005
rotation_covariance_base: 0.005
max_dt: 0.1
max_delta_wheels: 6.0
Questions
- Is the plugin name/filename correct for ROS 2 Humble with Ignition?
- Should I be using
libign_ros2_control-system.so
instead? - Could this be a build or install path issue?
Thanks in advance for any help!