Skip to content

Commit

Permalink
feat: add license (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuYamamoto authored Apr 27, 2024
1 parent 372f851 commit bca2828
Show file tree
Hide file tree
Showing 19 changed files with 575 additions and 290 deletions.
14 changes: 14 additions & 0 deletions navyu_costmap_2d/include/navyu_costmap_2d/navyu_costmap_2d.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 RyuYamamoto.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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

#ifndef NAVYU_COSTMAP_2D__NAVYU_COSTMAP_2D_HPP_
#define NAVYU_COSTMAP_2D__NAVYU_COSTMAP_2D_HPP_

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 RyuYamamoto.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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

#ifndef NAVYU_COSTMAP_2D__PLUGINS__INFLATION_LAYER_HPP_
#define NAVYU_COSTMAP_2D__PLUGINS__INFLATION_LAYER_HPP_

Expand Down
14 changes: 14 additions & 0 deletions navyu_costmap_2d/include/navyu_costmap_2d/plugins/layer.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 RyuYamamoto.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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

#ifndef NAVYU_COSTMAP_2D__PLUGINS__LAYER_HPP_
#define NAVYU_COSTMAP_2D__PLUGINS__LAYER_HPP_

Expand Down
14 changes: 14 additions & 0 deletions navyu_costmap_2d/include/navyu_costmap_2d/plugins/static_layer.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 RyuYamamoto.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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

#ifndef NAVYU_COSTMAP_2D__PLUGINS__STATIC_LAYER_HPP_
#define NAVYU_COSTMAP_2D__PLUGINS__STATIC_LAYER_HPP_

Expand Down
14 changes: 14 additions & 0 deletions navyu_costmap_2d/launch/navyu_costmap_2d.launch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2024 RyuYamamoto.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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

from launch_ros.actions import Node

from launch import LaunchDescription
Expand Down
14 changes: 14 additions & 0 deletions navyu_costmap_2d/src/navyu_costmap_2d.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2024 RyuYamamoto.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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

#include "navyu_costmap_2d/navyu_costmap_2d.hpp"

#include "navyu_costmap_2d/plugins/inflation_layer.hpp"
Expand Down
134 changes: 75 additions & 59 deletions navyu_navigation/launch/localization.launch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2024 RyuYamamoto.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
Expand All @@ -6,75 +20,77 @@
from launch_ros.substitutions import FindPackageShare
from launch_ros.actions import Node


def generate_launch_description():

use_sim_time = LaunchConfiguration('use_sim_time')
amcl_config_path = LaunchConfiguration('amcl_config_path')
map_path = LaunchConfiguration('map_path')
use_sim_time = LaunchConfiguration("use_sim_time")
amcl_config_path = LaunchConfiguration("amcl_config_path")
map_path = LaunchConfiguration("map_path")

costmap_config_path = PathJoinSubstitution(
[FindPackageShare('navyu_navigation'),
'config', 'global_costmap_params.yaml']
)
costmap_config_path = PathJoinSubstitution(
[FindPackageShare("navyu_navigation"), "config", "global_costmap_params.yaml"]
)

use_sim_time_cmd = DeclareLaunchArgument(
'use_sim_time', default_value='true', description=''
)
use_sim_time_cmd = DeclareLaunchArgument("use_sim_time", default_value="true", description="")

amcl_config_path_cmd = DeclareLaunchArgument(
'amcl_config_path',
default_value=PathJoinSubstitution([FindPackageShare('navyu_navigation'), 'config', 'amcl_params.yaml']),
description=''
)
amcl_config_path_cmd = DeclareLaunchArgument(
"amcl_config_path",
default_value=PathJoinSubstitution(
[FindPackageShare("navyu_navigation"), "config", "amcl_params.yaml"]
),
description="",
)

map_path_cmd = DeclareLaunchArgument(
'map_path',
default_value=PathJoinSubstitution([FindPackageShare('navyu_navigation'), 'map', 'map.yaml'])
)
map_path_cmd = DeclareLaunchArgument(
"map_path",
default_value=PathJoinSubstitution(
[FindPackageShare("navyu_navigation"), "map", "map.yaml"]
),
)

amcl_node = Node(
package='nav2_amcl',
executable='amcl',
name='amcl',
output='screen',
parameters=[amcl_config_path, {'use_sim_time': use_sim_time}],
)
amcl_node = Node(
package="nav2_amcl",
executable="amcl",
name="amcl",
output="screen",
parameters=[amcl_config_path, {"use_sim_time": use_sim_time}],
)

map_server_node = Node(
package='nav2_map_server',
executable='map_server',
name='map_server',
parameters=[{'yaml_filename': map_path}, {'frame_id': 'map'}]
)

lifecycle_node = Node(
package='nav2_lifecycle_manager',
executable='lifecycle_manager',
name='lifecycle_manager',
output='screen',
emulate_tty=True,
parameters=[{'use_sim_time': use_sim_time},
{'autostart': True},
{'node_names': ['map_server', 'amcl']}]
)
map_server_node = Node(
package="nav2_map_server",
executable="map_server",
name="map_server",
parameters=[{"yaml_filename": map_path}, {"frame_id": "map"}],
)

rviz_config = os.path.join(get_package_share_directory('navyu_navigation'), 'rviz', 'navigation.rviz')
rviz_node = Node(
package='rviz2',
executable='rviz2',
name='rviz2',
arguments=['-d', rviz_config]
)
lifecycle_node = Node(
package="nav2_lifecycle_manager",
executable="lifecycle_manager",
name="lifecycle_manager",
output="screen",
emulate_tty=True,
parameters=[
{"use_sim_time": use_sim_time},
{"autostart": True},
{"node_names": ["map_server", "amcl"]},
],
)

rviz_config = os.path.join(
get_package_share_directory("navyu_navigation"), "rviz", "navigation.rviz"
)
rviz_node = Node(
package="rviz2", executable="rviz2", name="rviz2", arguments=["-d", rviz_config]
)

ld = LaunchDescription()
ld = LaunchDescription()

ld.add_action(use_sim_time_cmd)
ld.add_action(amcl_config_path_cmd)
ld.add_action(map_path_cmd)
ld.add_action(amcl_node)
ld.add_action(map_server_node)
ld.add_action(lifecycle_node)
ld.add_action(rviz_node)
ld.add_action(use_sim_time_cmd)
ld.add_action(amcl_config_path_cmd)
ld.add_action(map_path_cmd)
ld.add_action(amcl_node)
ld.add_action(map_server_node)
ld.add_action(lifecycle_node)
ld.add_action(rviz_node)

return ld
return ld
Loading

0 comments on commit bca2828

Please sign in to comment.