Commit 6969c7a0 authored by Inès EL HADRI's avatar Inès EL HADRI 💤

First package tutorial end

parent 572b5113
......@@ -24,3 +24,12 @@ if(BUILD_TESTING)
endif()
ament_package()
# Install launch files.
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/
)
# Python scripts
install( PROGRAMS scripts/myNode.py DESTINATION lib/${PROJECT_NAME})
\ No newline at end of file
......@@ -4,8 +4,8 @@
<name>tuto_kickoff</name>
<version>0.0.0</version>
<description>Package du tuto</description>
<maintainer email="lucas.naury@todo.todo">lucas.naury</maintainer>
<maintainer email="ines.el/hadri@todo.todo">ines.el.hadri</maintainer>
<maintainer email="lucas.naury@etu.imt-nord-europe.fr">lucas.naury</maintainer>
<maintainer email="ines.el.hadri@etu.imt-nord-europe.fr">ines.el.hadri</maintainer>
<license>MIT</license>
<buildtool_depend>ament_cmake</buildtool_depend>
......@@ -13,6 +13,11 @@
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<!--Dependencies-->
<depend>rclpy</depend>
<depend>std_msgs</depend>
<depend>geometry_msgs</depend>
<export>
<build_type>ament_cmake</build_type>
</export>
......
#!/usr/bin/python3
import rclpy # core ROS2 client python library
from rclpy.node import Node # To manipulate ROS Nodes
def main():
rclpy.init() # Initialize ROS2 client
myNode= Node('blanc_node') # Create a Node, with a name
# Start the ros infinite loop with myNode.
rclpy.spin( myNode )
# At the end, destroy the node explicitly.
myNode.destroy_node()
# and shut the light down.
rclpy.shutdown()
print("tuto_move :: STOP.")
# If the file is executed as a script (ie. not imported).
if __name__ == '__main__':
# call main() function
main()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment