roscon2022_workshop icon indicating copy to clipboard operation
roscon2022_workshop copied to clipboard

Task 7 solution: missing command interfaces 'flange_gpios/digital_out_1' 'flange_gpios/digital_out_2'

Open WMGIII opened this issue 1 year ago • 1 comments

Error when running task 7 solution with command below: ros2 launch controlko_bringup rrbot.launch.py use_mock_hardware:=false

Screenshot_20230630_190923

[INFO] [launch]: All log files can be found below /home/wmiii/.ros/log/2023-06-30-18-59-15-063098-wmiii-desktop-273062 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [ros2_control_node-1]: process started with pid [273065] [INFO] [robot_state_publisher-2]: process started with pid [273067] [ros2_control_node-1] [INFO] [1688122755.844726183] [resource_manager]: Loading hardware 'rrbot' [ros2_control_node-1] [INFO] [1688122755.845473834] [resource_manager]: Initialize hardware 'rrbot' [ros2_control_node-1] [INFO] [1688122755.845807885] [resource_manager]: Successful initialization of hardware 'rrbot' [ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error' [ros2_control_node-1] what(): Wrong state or command interface configuration. [ros2_control_node-1] missing state interfaces: [ros2_control_node-1] [ros2_control_node-1] missing command interfaces: [ros2_control_node-1] ' flange_gpios/digital_out_1 ' ' flange_gpios/digital_out_2 '

After changing info_.sensors[0] to info_.gpios[0] in the codes below and build the package, the problem was solved. https://github.com/ros-controls/roscon2022_workshop/blob/81d162645c7d0cc0d4376fefe49e802e7380e897/controlko_hardware_interface/src/rrbot_hardware_interface.cpp#L113C1-L118C4

Screenshot_20230630_193345

WMGIII avatar Jun 30 '23 11:06 WMGIII

nice solution, thank you very much.

yinguoxiangyi avatar Aug 15 '23 13:08 yinguoxiangyi