Skip to content

Commit 0873e7b

Browse files
authored
Merge pull request #42 from deepinbubblegum/launch_develop
Launch develop
2 parents 76f229d + 46ffb8d commit 0873e7b

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

Diff for: README.md

+5
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ Run with customized parameter file:
121121

122122
ros2 run bno055 bno055 --ros-args --params-file ./src/bno055/bno055/params/bno055_params.yaml
123123

124+
Run launch file:
125+
126+
ros2 launch bno055 bno055.launch.py
127+
128+
124129
### Performing flake8 Linting
125130

126131
To perform code linting with [flake8](https://gitlab.com/pycqa/flake8) just perform:

Diff for: launch/bno055.launch.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
from ament_index_python.packages import get_package_share_directory
3+
from launch import LaunchDescription
4+
from launch_ros.actions import Node
5+
def generate_launch_description():
6+
ld = LaunchDescription()
7+
config = os.path.join(
8+
get_package_share_directory('bno055'),
9+
'config',
10+
'bno055_params.yaml'
11+
)
12+
13+
node=Node(
14+
package = 'bno055',
15+
executable = 'bno055',
16+
parameters = [config]
17+
)
18+
ld.add_action(node)
19+
return ld

Diff for: setup.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
from glob import glob
13
from setuptools import find_packages
24
from setuptools import setup
35

@@ -16,6 +18,8 @@
1618
('share/ament_index/resource_index/packages',
1719
['resource/' + package_name]),
1820
('share/' + package_name, ['package.xml']),
21+
(os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')),
22+
(os.path.join('share', package_name, 'config'), glob('bno055/params/*.yaml'))
1923
],
2024
install_requires=['setuptools'],
2125
zip_safe=True,

0 commit comments

Comments
 (0)