Skip to content

Commit f737e8a

Browse files
committed
Made some changes to allow switching between ament_python and ament_cmake_python.
Currently requires comment in and out parts of package.xml Idea is that if you don't want the cpp package you could just use the python one without building using cmake
1 parent 02ad5b2 commit f737e8a

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

elevation_mapping_cupy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Now launch the turtlebot3 in Gazebo with the following command:
3232
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
3333
```
3434

35-
Launch the elevation mapping node with the configs for the turtle:
35+
Launch the elevation mapping node with the configs for the turtle. Set use_python_node to true to use it instead of the cpp node:
3636
```bash
37-
ros2 launch elevation_mapping_cupy elevation_mapping_turtle.launch.py
37+
ros2 launch elevation_mapping_cupy elevation_mapping_turtle.launch.py use_python_node:=false
3838
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/workspaces/reo-ws/src/mapping/elevation_mapping_cupy/elevation_mapping_cupy/scripts/elevation_mapping_node.py

elevation_mapping_cupy/package.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@
66
<maintainer email="[email protected]">Takahiro Miki</maintainer>
77
<license>MIT</license>
88

9+
<!-- Comment out these lines to build only with python -->
910
<buildtool_depend>ament_cmake</buildtool_depend>
1011
<buildtool_depend>ament_cmake_python</buildtool_depend>
1112

13+
<!-- Comment in to build only with python -->
14+
<!-- <buildtool_depend>ament_python</buildtool_depend> -->
15+
1216
<!-- Core ROS2 dependencies -->
1317
<depend>rclpy</depend>
18+
<!-- Comment out to build only with python -->
1419
<depend>rclcpp</depend>
1520
<depend>std_msgs</depend>
1621
<depend>std_srvs</depend>
@@ -55,8 +60,10 @@
5560
<test_depend>ament_lint_common</test_depend>
5661

5762
<export>
58-
<!-- <build_type>ament_cmake_python</build_type> -->
63+
<!-- Comment out to build only with python -->
5964
<build_type>ament_cmake</build_type>
65+
<!-- Comment in to build only with python -->
66+
<!-- <build_type>ament_python</build_type> -->
6067
</export>
6168

6269
</package>

elevation_mapping_cupy/resource/elevation_mapping_cupy

Whitespace-only changes.

elevation_mapping_cupy/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
tests_require=['pytest'],
2020
entry_points={
2121
'console_scripts': [
22-
'elevation_mapping_node = elevation_mapping_cupy.elevation_mapping_ros:main',
22+
'elevation_mapping_node.py = elevation_mapping_cupy.elevation_mapping_node:main',
2323
],
2424
},
2525
data_files=[
26+
('share/ament_index/resource_index/packages',['resource/' + package_name]),
2627
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
2728
*[(os.path.join('share', package_name, os.path.dirname(yaml_file)), [yaml_file]) for yaml_file in glob('config/**/*.yaml', recursive=True)],
2829
# also the .*dat files

0 commit comments

Comments
 (0)