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

Launch EtercatDriver on inactive state at initial state #83

Closed
MattiaDeiRossi opened this issue Oct 6, 2023 · 1 comment
Closed

Launch EtercatDriver on inactive state at initial state #83

MattiaDeiRossi opened this issue Oct 6, 2023 · 1 comment

Comments

@MattiaDeiRossi
Copy link

Hi all,

I would to launch ros2_control_node having my hardware component on inactive state as first state.
I read the documentation at https://control.ros.org/master/doc/ros2_control/controller_manager/doc/userdoc.html that works like

hardware_components_initial_state:
  unconfigured:
    - "arm1"
    - "arm2"
  inactive:
    - "base3"

and my ros2_control description looks like:

<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
  <xacro:macro name="awtube_ros2_control"
    params="use_fake_hardware:=^|true robot_id:=^|awtube brand:=^|synapticon mode_of_op:=^|8">

    <ros2_control name="AwTubeSystem" type="system">
      <hardware>
        <xacro:if value="${use_fake_hardware}">
          <plugin>fake_components/GenericSystem</plugin>
        </xacro:if>
        <xacro:unless value="${use_fake_hardware}">
          <plugin>ethercat_driver/EthercatDriver</plugin>
          <param name="master_id">0</param>
          <param name="control_frequency">1000</param>
        </xacro:unless>
      </hardware>
      .
      .
      .
    </ros2_control>
  </xacro:macro>
</robot>

When writing in my ros2_controller.yam the following code, controllers go immediately in the activate state, and do not stop in the inactive.

controller_manager:
  ros__parameters:
    update_rate: 1000
    hardware_components_initial_state:
      inactive:
      - AwTubeSystem

Have your got any idea to add this feature?

Thanks

@MattiaDeiRossi
Copy link
Author

Solved in #1128

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

1 participant