Giter Site home page Giter Site logo

rick-v-e / epos_hardware Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 12.54 MB

Harware interface for Maxon Epos motor controllers using ROS 2 control

License: MIT License

CMake 3.25% Shell 1.75% C 42.82% C++ 52.18%
epos2 epos4 hardware-interface ros2 ros2-control motor-control maxon

epos_hardware's Introduction

Maxon Epos Hardware Interface

ROS2 control hardware interface for Maxon Epos 2/4 motor controllers using the EPOS Command Library 6.8.1.0.

Adapted from https://github.com/yoshito-n-students/eposx_hardware and converted to ROS2.

Installation

  1. Install UDEV rules:
ros2 run epos_hardware install_udev_rules
  1. Get motor controllers serial id:
ros2 run epos_hardware list_available_devices

Usage

Add the plugin to the ros2_control tag in your URDF file:

<ros2_control name="epos_hardware" type="system">
    <hardware>
        <plugin>epos_hardware/EposHardware</plugin>

         <joint name="front_left_wheel_joint">
            <param name="device_name">EPOS2</param>
            <param name="protocol_stack_name">MAXON SERIAL V2</param>
            <param name="interface_name">USB</param>
            <param name="serial_number">0xxxxxxxxxxxxx</param>
            <param name="clear_faults">false</param>
            <param name="profile_position_velocity">30</param>
            <param name="profile_position_acceleration">50</param>
            <param name="profile_position_deceleration">50</param>
            <param name="profile_velocity_acceleration">50</param>
            <param name="profile_velocity_deceleration">50</param>

            <command_interface name="velocity"/>
            <state_interface name="position"/>
            <state_interface name="velocity"/>
        </joint>
        <transmission name="rear_right_wheel_joint_transmission">
            <plugin>transmission_interface/SimpleTransmission</plugin>
            <actuator name="rear_right_motor" role="rear_right_motor"/>
            <joint name="rear_right_wheel_joint" role="rear_right_wheel_joint">
                <mechanical_reduction>53</mechanical_reduction>
            </joint>
        </transmission>
        
        <joint name="front_right_wheel_joint">
            <param name="device_name">EPOS2</param>
            <param name="protocol_stack_name">MAXON SERIAL V2</param>
            <param name="interface_name">USB</param>
            <param name="serial_number">0xxxxxxxxxxxxx</param>
            <param name="clear_faults">false</param>
            <param name="profile_position_velocity">30</param>
            <param name="profile_position_acceleration">50</param>
            <param name="profile_position_deceleration">50</param>
            <param name="profile_velocity_acceleration">50</param>
            <param name="profile_velocity_deceleration">50</param>

            <command_interface name="velocity"/>
            <state_interface name="position"/>
            <state_interface name="velocity"/>
        </joint>
         <transmission name="front_right_wheel_joint_transmission">
            <plugin>transmission_interface/SimpleTransmission</plugin>
            <actuator name="rear_right_motor" role="rear_right_motor"/>
            <joint name="front_right_wheel_joint" role="front_right_wheel_joint">
                <mechanical_reduction>-53</mechanical_reduction>
            </joint>
        </transmission>
</ros2_control>

In our setup, every controller is connected seperately to the computer using USB, however, all methods that work with the Epos Command Library should also work with this code. For each joint, an device_name, protocol_stack_name, interface_name, serial_number and encoder_resolution parameter should be set. Additionally, a clear_faults parameter can be set, which clears all device faults upon start.

The profile_position_velocity parameter sets the velocity in the position profile in rad/s before the reduction. profile_position_acceleration and profile_position_deceleration are setting the corresponding acceleration and deceleration values in rad/s2 before the reduction. The profile_velocity_acceleration and profile_velocity_deceleration are setting these values for the profile velocity mode.

Supported command interfaces

Command interface position, velocity and current are supported.

Supported state interfaces

The following state interfaces are supported:

  • position (Position)
  • velocity (Velocity)
  • current (Current [A])

epos_hardware's People

Contributors

rick-v-e avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ausnahm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.