Skip to content

hardware_components_initial_state doesn't work #1128

@MattiaDeiRossi

Description

@MattiaDeiRossi

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. What am I doing wrong?

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

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions