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

Hardware interface not loading for Foxy #79

Open
AJBuilder opened this issue Mar 21, 2023 · 1 comment
Open

Hardware interface not loading for Foxy #79

AJBuilder opened this issue Mar 21, 2023 · 1 comment

Comments

@AJBuilder
Copy link

AJBuilder commented Mar 21, 2023

Abstract

I'm working on porting to Foxy and I can't load hardware interface plugin. Keep getting a CreateClassException.

[ros2_control_node-2] terminate called after throwing an instance of 'pluginlib::CreateClassException'
[ros2_control_node-2] what(): MultiLibraryClassLoader: Could not create class of type vesc_hw_interface::VescHwInterface

I've modified the interface implementations to work with Foxy.

How to Reproduce the Bug

Plugin export .xml:

<?xml version="1.0"?>
<library path="vesc_hw_interface">
  <class name="vesc_hw_interface/VescHwInterface" type="vesc_hw_interface::VescHwInterface" base_class_type="hardware_interface::ActuatorInterface">
    <description>
      plugin of VESC hardware interface
    </description>
  </class>
</library>

Urdf tag:

<ros2_control name="Vesc" type="actuator">
    <hardware>
        <plugin>vesc_hw_interface/VescHwInterface</plugin>
        <param name="port">/dev/ttyACM0</param>
        <param name="gear_ratio">1</param>
        <param name="velocity">1</param>
        
    </hardware>
    <joint name="left_front_motor">
        <command_interface name="velocity">
            <param name="min">-10</param>
            <param name="max">10</param>
        </command_interface>
        <state_interface name="position" />
        <state_interface name="velocity" />
        <state_interface name="effort" />
    </joint>
  </ros2_control>

Suggestion

I'm fairly convinced this isn't my urdf, and I don't recall touching anything regarding naming and exporting for the plugin.

I'm working on migrating to ros2 Foxy, so I've been modifying the interface implementations.

Can anyone point me in the right direction? Is this a interface implementation issue?
I struggled to find anything useful regarding CreateClassException and the error message isn't useful.

@jsupratman13
Copy link
Contributor

It would be great if you could show us your working branch. Otherwise, the best we could say is to check the documentation.

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