|
1 |
| -# Copyright 2022 Clearpath Robotics, Inc. |
2 |
| -# |
3 | 1 | # Software License Agreement (BSD)
|
4 | 2 | #
|
5 | 3 | # @author Roni Kreinin <[email protected]>
|
6 | 4 | # @copyright (c) 2022, Clearpath Robotics, Inc., All rights reserved.
|
7 | 5 | #
|
8 |
| -# Redistribution and use in source and binary forms, with or without modification, are permitted provided that |
9 |
| -# the following conditions are met: |
10 |
| -# * Redistributions of source code must retain the above copyright notice, this list of conditions and the |
11 |
| -# following disclaimer. |
12 |
| -# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the |
13 |
| -# following disclaimer in the documentation and/or other materials provided with the distribution. |
14 |
| -# * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or |
15 |
| -# promote products derived from this software without specific prior written permission. |
| 6 | +# Redistribution and use in source and binary forms, with or without |
| 7 | +# modification, are permitted provided that the following conditions are met: |
| 8 | +# * Redistributions of source code must retain the above copyright notice, |
| 9 | +# this list of conditions and the following disclaimer. |
| 10 | +# * Redistributions in binary form must reproduce the above copyright notice, |
| 11 | +# this list of conditions and the following disclaimer in the documentation |
| 12 | +# and/or other materials provided with the distribution. |
| 13 | +# * Neither the name of Clearpath Robotics nor the names of its contributors |
| 14 | +# may be used to endorse or promote products derived from this software |
| 15 | +# without specific prior written permission. |
16 | 16 | #
|
17 |
| -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED |
18 |
| -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
19 |
| -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
20 |
| -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
21 |
| -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
22 |
| -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
23 |
| -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 17 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 | +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 20 | +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 21 | +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 24 | +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 25 | +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 26 | +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
24 | 27 | # POSSIBILITY OF SUCH DAMAGE.
|
25 | 28 |
|
26 | 29 |
|
|
31 | 34 | from launch_ros.actions import Node
|
32 | 35 |
|
33 | 36 | ARGUMENTS = [
|
34 |
| - DeclareLaunchArgument('hz', default_value='1.0', |
35 |
| - description='Update frequency'), |
36 |
| - DeclareLaunchArgument('dev', default_value="''", |
37 |
| - description='Wireless device'), |
38 |
| - DeclareLaunchArgument('connected_topic', default_value='connected', |
39 |
| - description='Connected status topic'), |
40 |
| - DeclareLaunchArgument('connection_topic', default_value='connection', |
41 |
| - description='Connection information topic'), |
42 |
| - DeclareLaunchArgument('namespace', default_value='', |
43 |
| - description='Namespace'), |
| 37 | + DeclareLaunchArgument('hz', default_value='1.0', description='Update frequency'), |
| 38 | + DeclareLaunchArgument('dev', default_value='', description='Wireless device'), |
| 39 | + DeclareLaunchArgument( |
| 40 | + 'connected_topic', default_value='connected', description='Connected status topic' |
| 41 | + ), |
| 42 | + DeclareLaunchArgument( |
| 43 | + 'connection_topic', default_value='connection', description='Connection information topic' |
| 44 | + ), |
| 45 | + DeclareLaunchArgument('namespace', default_value='', description='Namespace'), |
44 | 46 | ]
|
45 | 47 |
|
46 | 48 |
|
47 | 49 | def generate_launch_description():
|
48 | 50 |
|
49 | 51 | watcher = Node(
|
50 |
| - package='wireless_watcher', |
51 |
| - executable='wireless_watcher', |
52 |
| - name='wireless_watcher', |
53 |
| - namespace=LaunchConfiguration('namespace'), |
54 |
| - output='screen', |
55 |
| - parameters=[{ |
56 |
| - 'hz': LaunchConfiguration('hz'), |
57 |
| - 'dev': LaunchConfiguration('dev'), |
58 |
| - 'connected_topic': LaunchConfiguration('connected_topic'), |
59 |
| - 'connection_topic': LaunchConfiguration('connection_topic') |
60 |
| - }], |
61 |
| - ) |
| 52 | + package='wireless_watcher', |
| 53 | + executable='wireless_watcher', |
| 54 | + name='wireless_watcher', |
| 55 | + namespace=LaunchConfiguration('namespace'), |
| 56 | + output='screen', |
| 57 | + parameters=[ |
| 58 | + { |
| 59 | + 'hz': LaunchConfiguration('hz'), |
| 60 | + 'dev': LaunchConfiguration('dev'), |
| 61 | + 'connected_topic': LaunchConfiguration('connected_topic'), |
| 62 | + 'connection_topic': LaunchConfiguration('connection_topic'), |
| 63 | + } |
| 64 | + ], |
| 65 | + ) |
62 | 66 |
|
63 | 67 | ld = LaunchDescription(ARGUMENTS)
|
64 | 68 | ld.add_action(watcher)
|
|
0 commit comments