Skip to content

Commit 2eed62d

Browse files
authored
Merge pull request clearpathrobotics#65 from clearpathrobotics/lcamero/customization
Customization Packages
2 parents 5589c29 + 7289a44 commit 2eed62d

File tree

19 files changed

+535
-0
lines changed

19 files changed

+535
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(clearpath_customization)
3+
4+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
add_compile_options(-Wall -Wextra -Wpedantic)
6+
endif()
7+
8+
find_package(ament_cmake REQUIRED)
9+
10+
install(PROGRAMS
11+
scripts/generate_bringup
12+
scripts/generate_description
13+
DESTINATION lib/${PROJECT_NAME}
14+
)
15+
16+
install(DIRECTORY
17+
project_bringup
18+
project_description
19+
DESTINATION share/${PROJECT_NAME}
20+
)
21+
22+
if(BUILD_TESTING)
23+
find_package(ament_lint_auto REQUIRED)
24+
set(ament_cmake_copyright_FOUND TRUE)
25+
set(ament_cmake_cpplint_FOUND TRUE)
26+
ament_lint_auto_find_test_dependencies()
27+
endif()
28+
29+
ament_package()

clearpath_customization/LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Redistribution and use in source and binary forms, with or without
2+
modification, are permitted provided that the following conditions are met:
3+
4+
* Redistributions of source code must retain the above copyright
5+
notice, this list of conditions and the following disclaimer.
6+
7+
* Redistributions in binary form must reproduce the above copyright
8+
notice, this list of conditions and the following disclaimer in the
9+
documentation and/or other materials provided with the distribution.
10+
11+
* Neither the name of the copyright holder nor the names of its
12+
contributors may be used to endorse or promote products derived from
13+
this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25+
POSSIBILITY OF SUCH DAMAGE.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>clearpath_customization</name>
5+
<version>0.2.6</version>
6+
<description>Clearpath customization packages.</description>
7+
8+
<maintainer email="[email protected]">Luis Camero</maintainer>
9+
10+
<license>BSD</license>
11+
12+
<buildtool_depend>ament_cmake</buildtool_depend>
13+
14+
<test_depend>ament_lint_auto</test_depend>
15+
<test_depend>ament_lint_common</test_depend>
16+
17+
<export>
18+
<build_type>ament_cmake</build_type>
19+
</export>
20+
</package>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(project_bringup)
3+
4+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
add_compile_options(-Wall -Wextra -Wpedantic)
6+
endif()
7+
8+
find_package(ament_cmake REQUIRED)
9+
install(DIRECTORY config launch
10+
DESTINATION share/${PROJECT_NAME}
11+
)
12+
13+
if(BUILD_TESTING)
14+
find_package(ament_lint_auto REQUIRED)
15+
set(ament_cmake_copyright_FOUND TRUE)
16+
set(ament_cmake_cpplint_FOUND TRUE)
17+
ament_lint_auto_find_test_dependencies()
18+
endif()
19+
20+
ament_package()
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Redistribution and use in source and binary forms, with or without
2+
modification, are permitted provided that the following conditions are met:
3+
4+
* Redistributions of source code must retain the above copyright
5+
notice, this list of conditions and the following disclaimer.
6+
7+
* Redistributions in binary form must reproduce the above copyright
8+
notice, this list of conditions and the following disclaimer in the
9+
documentation and/or other materials provided with the distribution.
10+
11+
* Neither the name of the copyright holder nor the names of its
12+
contributors may be used to endorse or promote products derived from
13+
this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25+
POSSIBILITY OF SUCH DAMAGE.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**/device:
2+
ros__parameters:
3+
serial_no: "0"
4+
pointcloud.enable: true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from clearpath_config.clearpath_config import ClearpathConfig
2+
from launch import LaunchDescription
3+
from launch.substitutions import PathJoinSubstitution
4+
from launch_ros.actions import Node
5+
from launch_ros.substitutions import FindPackageShare
6+
7+
8+
def generate_launch_description():
9+
# Node Name, Package and Executable
10+
name = "device"
11+
package = "realsense2_camera"
12+
executable = "realsense2_camera_node"
13+
14+
# Namespace from Clearpath Config
15+
namespace = ClearpathConfig('/etc/clearpath/robot.yaml').system.namespace
16+
extra_namespace = "/extras/device/"
17+
18+
# Project Directory
19+
pkg_project_bringup = FindPackageShare('project_bringup')
20+
21+
# Parameter File
22+
device_params = PathJoinSubstitution([pkg_project_bringup, 'config', 'device.yaml'])
23+
24+
# Node
25+
device_node = Node(
26+
name=name,
27+
namespace=namespace + extra_namespace,
28+
package=package,
29+
executable=executable,
30+
parameters=[device_params],
31+
output='screen',
32+
)
33+
34+
# Launch Description
35+
ld = LaunchDescription()
36+
ld.add_action(device_node)
37+
return ld
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from launch import LaunchDescription
2+
from launch.actions import IncludeLaunchDescription
3+
from launch.launch_description_sources import PythonLaunchDescriptionSource
4+
from launch.substitutions import PathJoinSubstitution
5+
from launch_ros.substitutions import FindPackageShare
6+
7+
8+
def generate_launch_description():
9+
# Package Directory
10+
pkg_project_bringup = FindPackageShare('project_bringup')
11+
12+
# Launch File
13+
device_launch = PathJoinSubstitution([pkg_project_bringup, 'launch', 'device.launch.py'])
14+
15+
# Include Launch
16+
include_launch = IncludeLaunchDescription(PythonLaunchDescriptionSource([device_launch]))
17+
18+
# Launch Description
19+
ld = LaunchDescription()
20+
ld.add_action(include_launch)
21+
return ld
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>project_bringup</name>
5+
<version>0.0.0</version>
6+
<description>Customization project bringup package</description>
7+
<maintainer email="[email protected]">Luis Camero</maintainer>
8+
<license>BSD-3-Clause</license>
9+
10+
<buildtool_depend>ament_cmake</buildtool_depend>
11+
12+
<test_depend>ament_lint_auto</test_depend>
13+
<test_depend>ament_lint_common</test_depend>
14+
15+
<exec_depend>clearpath_config</exec_depend>
16+
17+
<export>
18+
<build_type>ament_cmake</build_type>
19+
</export>
20+
</package>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(project_description)
3+
4+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
add_compile_options(-Wall -Wextra -Wpedantic)
6+
endif()
7+
8+
find_package(ament_cmake REQUIRED)
9+
install(DIRECTORY meshes urdf
10+
DESTINATION share/${PROJECT_NAME}
11+
)
12+
13+
if(BUILD_TESTING)
14+
find_package(ament_lint_auto REQUIRED)
15+
set(ament_cmake_copyright_FOUND TRUE)
16+
set(ament_cmake_cpplint_FOUND TRUE)
17+
ament_lint_auto_find_test_dependencies()
18+
endif()
19+
20+
ament_package()

0 commit comments

Comments
 (0)