# For python:
ros2 pkg create --build-type ament_python --node-name my_node my_package
# For cmake:
ros2 pkg create --build-type ament_cmake --node-name my_node my_package
# p.s. Make sure you have sourced ros2. (e.g. `source /opt/ros/foxy/local_setup.bash`)
#Don't forget to cd into src folder of workspace
ros2 pkg create --build-type ament_python <package_name>
#You can also create nodes along :
ros2 pkg create --build-type ament_python --node-name my_node my_package
#Bonus :
alias ros2_pkg_create='ros2 pkg create --build-type ament_python $1'
ros2_pkg_create <package name>