Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
larm-astro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Inès EL HADRI
larm-astro
Commits
6969c7a0
Commit
6969c7a0
authored
Dec 20, 2023
by
Inès EL HADRI
💤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First package tutorial end
parent
572b5113
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
2 deletions
+39
-2
CMakeLists.txt
tuto_kickoff/CMakeLists.txt
+9
-0
package.xml
tuto_kickoff/package.xml
+7
-2
myNode.py
tuto_kickoff/scripts/myNode.py
+23
-0
No files found.
tuto_kickoff/CMakeLists.txt
View file @
6969c7a0
...
...
@@ -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
tuto_kickoff/package.xml
View file @
6969c7a0
...
...
@@ -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>
...
...
tuto_kickoff/scripts/myNode.py
0 → 100644
View file @
6969c7a0
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment