latest pushes

This commit is contained in:
Ronaldson Bellande 2024-07-27 12:23:13 -04:00
parent e1bdebb248
commit 2698a97e98
3 changed files with 31 additions and 32 deletions

View File

@ -31,17 +31,16 @@ def ros1_launch_description():
def ros2_launch_description():
# Declare launch arguments
setpoint_arg = DeclareLaunchArgument('setpoint')
kp_arg = DeclareLaunchArgument('kp')
ki_arg = DeclareLaunchArgument('ki')
kd_arg = DeclareLaunchArgument('kd')
gains_arg = DeclareLaunchArgument('gains', default_value='[1.0, 0.1, 0.05]')
name_arg = DeclareLaunchArgument('name', default_value='BellandeController')
output_limits_arg = DeclareLaunchArgument('output_limits', default_value='[-1000.0, 1000.0]')
# Create a list to hold all nodes to be launched
nodes_to_launch = []
# ROS2 specific configurations
ros_launch_arguments = [
setpoint_arg, kp_arg, ki_arg, kd_arg,
gains_arg, name_arg, output_limits_arg,
]
nodes_to_launch.append(Node(
@ -50,10 +49,9 @@ def ros2_launch_description():
name='bellande_controller_node',
output='screen',
parameters=[
{'setpoint': LaunchConfiguration('setpoint')},
{'kp': LaunchConfiguration('kp')},
{'ki': LaunchConfiguration('ki')},
{'kd': LaunchConfiguration('kd')},
{'gains': LaunchConfiguration('gains')},
{'name': LaunchConfiguration('name')},
{'output_limits': LaunchConfiguration('output_limits')},
],
))

View File

@ -1,32 +1,32 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
<!-- Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
http://www.apache.org/licenses/LICENSE-2.0
T
is 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 <https://www.gnu.org/licenses/>.
-->
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
-->
<launch>
<!-- Define arguments -->
<arg name="setpoint" default="0" />
<arg name="kp" default="1.0" />
<arg name="ki" default="0.1" />
<arg name="kd" default="0.05" />
<!-- Arguments -->
<arg name="gains" default="[1.0, 0.1, 0.05]"/>
<arg name="name" default="BellandeController"/>
<arg name="output_limits" default="[-1000.0, 1000.0]"/>
<!-- Launch the BellandeController node -->
<node name="bellande_controller_node" pkg="ros_web_api_bellande_adaptive_continuious_controller"
type="bellande_controller.py" output="screen">
<param name="setpoint" value="$(arg setpoint)" />
<param name="kp" value="$(arg kp)" />
<param name="ki" value="$(arg ki)" />
<param name="kd" value="$(arg kd)" />
<node name="bellande_controller_node" pkg="ros_web_api_bellande_adaptive_continuious_controller" type="bellande_controller.py" output="screen">
<param name="gains" value="$(arg gains)"/>
<param name="name" value="$(arg name)"/>
<param name="output_limits" value="$(arg output_limits)"/>
</node>
</launch>

View File

@ -15,6 +15,7 @@ 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 <https://www.gnu.org/licenses/>.
-->
<package format="3">
<name>ros_web_api_bellande_adaptive_continuious_controller</name>
<version>0.0.1</version>