forked from JoJoHTM/Sensors_drivers_BROV2
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinit.py
More file actions
20 lines (17 loc) · 772 Bytes
/
init.py
File metadata and controls
20 lines (17 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
## Python script to build all the sensors drivers publisher ##
# Subprocess is use in python code to interact with the command shell.
# Here, the attribut "run" launch the command in the shell and wait for the end of the command.
import subprocess
# colcon is use to build all the packets after. The packet sensor_interface is use to make an bridge between the messages of the probe and ROS
# The other packages use sensor_interface to have access to the value and publish them
packages = [
'sensor_interfaces',
'sensor_thermometer',
'sensor_barometer',
'sensor_oxygen',
'sensor_salinity',
'sensor_battery',
'logger',
'modem_communication'
]
subprocess.run(['colcon', 'build', '--packages-select'] + packages + ['--symlink-install'])