From 172eefcf11c43a09333b01140ad440f00b5cbb25 Mon Sep 17 00:00:00 2001 From: RonaldsonBellande Date: Sat, 27 Jul 2024 12:52:35 -0400 Subject: [PATCH 1/4] latest pushes --- .../launch/bellande_controller.launch.py | 83 +++++++++++++++++++ .../launch/ros1/bellande_controller.launch | 39 +++++++++ 2 files changed, 122 insertions(+) create mode 100644 humanoid_robot_intelligence_control_system_controller/launch/bellande_controller.launch.py create mode 100644 humanoid_robot_intelligence_control_system_controller/launch/ros1/bellande_controller.launch diff --git a/humanoid_robot_intelligence_control_system_controller/launch/bellande_controller.launch.py b/humanoid_robot_intelligence_control_system_controller/launch/bellande_controller.launch.py new file mode 100644 index 0000000..17fdc78 --- /dev/null +++ b/humanoid_robot_intelligence_control_system_controller/launch/bellande_controller.launch.py @@ -0,0 +1,83 @@ +# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import sys +import subprocess +from launch import LaunchDescription +from launch_ros.actions import Node +from launch.actions import DeclareLaunchArgument +from launch.substitutions import LaunchConfiguration + +def ros1_launch_description(): + # Get command-line arguments + args = sys.argv[1:] + + # Construct the ROS 1 launch command + roslaunch_command = ["roslaunch", "humanoid_robot_intelligence_control_system_controller", "bellande_controller.launch"] + args + + roslaunch_command.extend([ + "ros_web_api_bellande_adaptive_continuious_controller", "bellande_controller.py", "name:=bellande_controller_node" + ]) + + roslaunch_command.extend([ + "humanoid_robot_intelligence_control_system_controller", "BellandeController.py", "name:=bellande_controller_class_node" + ]) + + # Execute the launch command + subprocess.call(roslaunch_command) + +def ros2_launch_description(): + nodes_to_launch = [] + + nodes_to_launch.append(Node( + package='ros_web_api_bellande_adaptive_continuious_controller', + executable='bellande_controller.py', + name='bellande_controller_node', + output='screen', + parameters=[{ + 'gains': LaunchConfiguration('gains'), + 'name': LaunchConfiguration('name'), + 'output_limits': LaunchConfiguration('output_limits') + }] + )) + + nodes_to_launch.append(Node( + package='humanoid_robot_intelligence_control_system_controller', + executable='BellandeController.py', + name='bellande_controller_class_node', + output='screen', + parameters=[{ + 'gains': LaunchConfiguration('gains'), + 'name': LaunchConfiguration('name'), + 'output_limits': LaunchConfiguration('output_limits') + }] + )) + + return LaunchDescription([ + DeclareLaunchArgument('gains', default_value='[1.0, 0.1, 0.05]'), + DeclareLaunchArgument('name', default_value='BellandeController'), + DeclareLaunchArgument('output_limits', default_value='[-1000.0, 1000.0]'), + ] + nodes_to_launch) + +if __name__ == "__main__": + ros_version = os.getenv("ROS_VERSION") + if ros_version == "1": + ros1_launch_description() + elif ros_version == "2": + ros2_launch_description() + else: + print("Unsupported ROS version. Please set the ROS_VERSION environment variable to '1' for ROS 1 or '2' for ROS 2.") + sys.exit(1) diff --git a/humanoid_robot_intelligence_control_system_controller/launch/ros1/bellande_controller.launch b/humanoid_robot_intelligence_control_system_controller/launch/ros1/bellande_controller.launch new file mode 100644 index 0000000..5bfe982 --- /dev/null +++ b/humanoid_robot_intelligence_control_system_controller/launch/ros1/bellande_controller.launch @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + From d4928af3d06e4658080339f9ef86ee40deb09220 Mon Sep 17 00:00:00 2001 From: Ronaldson Bellande <47253433+RonaldsonBellande@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:36:06 -0400 Subject: [PATCH 2/4] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 05ad151..9ccecfa 100755 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ Welcome to the {BR&SRI} Humanoid Robot Intelligence Control System architecture [![Sponsor](https://img.shields.io/badge/Sponsor-Robotics%20Sensors%20Research-red?style=for-the-badge&logo=github)](https://github.com/sponsors/Robotics-Sensors) +## 🧑‍💼 Work with Bellande Models through Bellande Framework! +[![Bellande's Framework through Bellande API](https://img.shields.io/badge/Bellande's%20Framework%20through%20Bellande's%20API-Bellande%20Framework-blue?style=for-the-badge&logo=ros&color=blue)](https://github.com/Robotics-Sensors/bellande_framework) + + ## 📢 Mobile and ROS Control System - [![Bellande's Internal Sensor Mobile iOS API](https://img.shields.io/badge/Bellande's%20Internal%20Sensor%20Mobile%20iOS%20API-Bellande%20API-blue?style=for-the-badge&logo=swift&color=blue)](https://github.com/Application-UI-UX/bellande_internal_sensor_mobile_ios_api) - [![Bellande's External Sensor Mobile iOS API](https://img.shields.io/badge/Bellande's%20External%20Sensor%20Mobile%20iOS%20API-Bellande%20API-blue?style=for-the-badge&logo=swift&color=blue)](https://github.com/Application-UI-UX/bellande_external_sensor_mobile_ios_api) From 49b5b89b051a6d983b249d98d1a70bef4e674aa4 Mon Sep 17 00:00:00 2001 From: Ronaldson Bellande <47253433+RonaldsonBellande@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:37:29 -0400 Subject: [PATCH 3/4] Update README.md From ee21ad04d643c5dbcdd94bdb15015bd046e61c63 Mon Sep 17 00:00:00 2001 From: Ronaldson Bellande <47253433+RonaldsonBellande@users.noreply.github.com> Date: Thu, 1 Aug 2024 07:42:17 -0400 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ccecfa..058bd1c 100755 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Welcome to the {BR&SRI} Humanoid Robot Intelligence Control System architecture [![Sponsor](https://img.shields.io/badge/Sponsor-Robotics%20Sensors%20Research-red?style=for-the-badge&logo=github)](https://github.com/sponsors/Robotics-Sensors) -## 🧑‍💼 Work with Bellande Models through Bellande Framework! +## 🧑‍💼 Work with Bellande Models, Algorithms, Systems, Architectures through Bellande Framework! [![Bellande's Framework through Bellande API](https://img.shields.io/badge/Bellande's%20Framework%20through%20Bellande's%20API-Bellande%20Framework-blue?style=for-the-badge&logo=ros&color=blue)](https://github.com/Robotics-Sensors/bellande_framework)