ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
172 stars 161 forks source link

I want to add `ament_auto` option to ros2 pkg create #782

Closed Ar-Ray-code closed 1 year ago

Ar-Ray-code commented 1 year ago

Our team uses ament_cmake_auto as buildtools, but since it cannot be generated with the ros2 pkg create command, it is copied from an existing package. Please consider incorporating the following differences to simplify package generation.

Ar-Ray-code commented 1 year ago

Thank you for your response. I’ll following your 2nd suggestion.

Ar-Ray-code commented 1 year ago

I added --ament-auto option and revert --build-type.

Test commands used are shown below.

ament_cmake_auto (success)

ros2 pkg create --build-type ament_cmake --node-name my_node my_package --dependencies rclcpp std_msgs sensor_msgs  --license Apache-2.0 --library-name libname --description "test pkg" --maintainer-name "Example" --maintainer-email "example@example.com" --package-format 3 --ament-auto

ament_python ( or cmake, error)

root@a633c9050ddb:/ros2_ws# ros2 pkg create --build-type ament_python --node-name my_node my_package --dependencies rclpy std_msgs sensor_msgs --license Apache-2.0 --library-name libname --description "test pkg" --maintainer-name "Example" --maintainer-email "example@example.com" --package-format 3 --ament-auto
[ERROR] ament_auto can only be used with ament_cmake packages
root@a633c9050ddb:/ros2_ws# 

What do you think?