Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails to load on ROS Jazzy #467

Open
phantson opened this issue Dec 26, 2024 · 1 comment
Open

Plugin fails to load on ROS Jazzy #467

phantson opened this issue Dec 26, 2024 · 1 comment

Comments

@phantson
Copy link

phantson commented Dec 26, 2024

While trying to link MoveIt2 and Gazebo in order to simulate my robot with this configuration :

Ros2 control :

<xacro:macro name="niryo_ned2_ros2_control" params="name initial_positions_file">
<xacro:property name="initial_positions" value="${xacro.load_yaml(initial_positions_file)['initial_positions']}"/>
<ros2_control name="${name}" type="system">
<hardware>
<!--
 By default, set up controllers for simulation. This won't work on real hardware 
-->
<plugin>mock_components/GenericSystem</plugin>
</hardware>
<joint name="joint_1">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['joint_1']}</param>
</state_interface>
</joint>
<joint name="joint_2">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['joint_2']}</param>
</state_interface>
</joint>
<joint name="joint_3">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['joint_3']}</param>
</state_interface>
</joint>
<joint name="joint_4">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['joint_4']}</param>
</state_interface>
</joint>
<joint name="joint_5">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['joint_5']}</param>
</state_interface>
</joint>
<joint name="joint_6">
<command_interface name="position"/>
<state_interface name="position">
<param name="initial_value">${initial_positions['joint_6']}</param>
</state_interface>
</joint>
</ros2_control>
</xacro:macro>

Ros2-gz :

<gazebo>
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>
/home/phantson/ws_simuxx/niryo_robot_ned2_config/config/ros2_controllers.yaml
</parameters>
</plugin>
</gazebo>

The plugin fails to load returning this error :
[ERROR] [1735203845.630924770] [gz_ros_control.GZResourceManager]: The plugin failed to load for some reason. Error: According to the loaded plugin descriptions the class mock_components/GenericSystem with base class type gz_ros2_control::GazeboSimSystemInterface does not exist. Declared types are gz_ros2_control/GazeboSimSystem ign_ros2_control/IgnitionSystem

The robot actually shows up on Gazebo but it is not responsive to MoveIt while asking to execute a trajectory. (Even if /joint_state is correctly working)

@phantson phantson added the bug Something isn't working label Dec 26, 2024
@christophfroehlich
Copy link
Contributor

why do you use mock_components/GenericSystem if you use gazebo?
See the gz_ros2_control_demos how this typically is set up, e.g. here.

@christophfroehlich christophfroehlich removed the bug Something isn't working label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants