Skip to content

Commit dc9fde3

Browse files
committed
Added Github codeowners, issue template, CI. Also, fixed linting.
1 parent 3233688 commit dc9fde3

File tree

11 files changed

+482
-275
lines changed

11 files changed

+482
-275
lines changed

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default all changes will request review from:
2+
* @clearpathrobotics/clearpath-platform-team

.github/ISSUE_TEMPLATE/bug.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug Report
3+
about: Provide a report for that the issue is
4+
title: ''
5+
labels: bug
6+
assignees: clearpathrobotics/clearpath-platform-team
7+
8+
---
9+
10+
**Please provide the following information:**
11+
- OS: (e.g. Ubuntu 24.04)
12+
- ROS 2 Distro: (e.g. Jazzy)
13+
- Built from source or installed:
14+
- Package version: (if from repository, give version from `sudo dpkg -s ros-$ROS_VERSION-wireless-watcher`, if from source, give commit hash)
15+
16+
17+
**Expected behaviour**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Actual behaviour**
21+
A clear and concise description of what you encountered.
22+
23+
**To Reproduce**
24+
Provide the steps to reproduce:
25+
1. run something
26+
2. launch something else
27+
3. see the error
28+
29+
30+
**Other notes**
31+
Add anything else you thing is important.

.github/ISSUE_TEMPLATE/feature.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature request
3+
about: Provide context for the feature you are requesting
4+
title: ''
5+
labels: enhancement
6+
assignees: clearpathrobotics/clearpath-platform-team
7+
8+
---
9+
10+
**Describe the the feature you would like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Other notes**
14+
Add anything else you thing is important.

.github/workflows/ci.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: wireless_watcher_ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: "0 0 * * *" # every day at midnight
8+
9+
jobs:
10+
wireless_watcher_osrf_industrial_ci_humble:
11+
name: Humble OSRF Industrial
12+
strategy:
13+
matrix:
14+
env:
15+
- {ROS_REPO: testing, ROS_DISTRO: humble}
16+
- {ROS_REPO: main, ROS_DISTRO: humble}
17+
fail-fast: false
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: 'ros-industrial/industrial_ci@master'
22+
env: ${{matrix.env}}
23+
wireless_watcher_cpr_ci_humble:
24+
name: Humble Clearpath Release
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- uses: actions/checkout@v3
28+
- uses: ros-tooling/[email protected]
29+
with:
30+
required-ros-distributions: humble
31+
- name: clearpath-package-server
32+
run: |
33+
sudo apt install wget
34+
wget https://packages.clearpathrobotics.com/public.key -O - | sudo apt-key add -
35+
sudo sh -c 'echo "deb https://packages.clearpathrobotics.com/stable/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/clearpath-latest.list'
36+
sudo apt-get update
37+
- uses: ros-tooling/[email protected]
38+
id: action_ros_ci_step
39+
with:
40+
target-ros2-distro: humble
41+
package-name: |
42+
wireless_watcher
43+
wireless_watcher_src_ci_humble:
44+
name: Humble Clearpath Source
45+
runs-on: ubuntu-22.04
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: ros-tooling/[email protected]
49+
with:
50+
required-ros-distributions: humble
51+
- uses: ros-tooling/[email protected]
52+
id: action_ros_ci_step
53+
with:
54+
target-ros2-distro: humble
55+
package-name: |
56+
wireless_watcher
57+
wireless_watcher_osrf_industrial_ci_jazzy:
58+
name: Jazzy OSRF Industrial
59+
strategy:
60+
matrix:
61+
env:
62+
- {ROS_REPO: testing, ROS_DISTRO: jazzy}
63+
- {ROS_REPO: main, ROS_DISTRO: jazzy}
64+
fail-fast: false
65+
runs-on: ubuntu-24.04
66+
steps:
67+
- uses: actions/checkout@v3
68+
- uses: 'ros-industrial/industrial_ci@master'
69+
env: ${{matrix.env}}
70+
wireless_watcher_cpr_ci_jazzy:
71+
name: Jazzy Clearpath Release
72+
runs-on: ubuntu-24.04
73+
steps:
74+
- uses: actions/checkout@v3
75+
- uses: ros-tooling/[email protected]
76+
with:
77+
required-ros-distributions: jazzy
78+
- name: clearpath-package-server
79+
run: |
80+
sudo apt install wget
81+
wget https://packages.clearpathrobotics.com/public.key -O - | sudo apt-key add -
82+
sudo sh -c 'echo "deb https://packages.clearpathrobotics.com/stable/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/clearpath-latest.list'
83+
sudo apt-get update
84+
- uses: ros-tooling/[email protected]
85+
id: action_ros_ci_step
86+
with:
87+
target-ros2-distro: jazzy
88+
package-name: |
89+
wireless_watcher
90+
wireless_watcher_src_ci_jazzy:
91+
name: Jazzy Clearpath Source
92+
runs-on: ubuntu-24.04
93+
steps:
94+
- uses: actions/checkout@v3
95+
- uses: ros-tooling/[email protected]
96+
with:
97+
required-ros-distributions: jazzy
98+
- uses: ros-tooling/[email protected]
99+
id: action_ros_ci_step
100+
with:
101+
target-ros2-distro: jazzy
102+
package-name: |
103+
wireless_watcher

wireless_msgs/package.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<version>1.1.4</version>
66
<description>Messages for describing a wireless network such as bitrate, essid, and link quality.</description>
77

8-
<author>Mike Purvis</author>
9-
108
<maintainer email="[email protected]">Roni Kreinin</maintainer>
119
<maintainer email="[email protected]">Tony Baltovski</maintainer>
12-
10+
1311
<license>BSD</license>
1412

13+
<author email="[email protected]">Mike Purvis</author>
14+
1515
<buildtool_depend>ament_cmake</buildtool_depend>
1616

1717
<depend>std_msgs</depend>

wireless_watcher/CHANGELOG.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ Changelog for package wireless_watcher
105105

106106
0.0.1 (2013-10-17)
107107
------------------
108-
* Catkinize wireless_watcher
108+
* Catkinize wireless_watcher

wireless_watcher/CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,15 @@ install(FILES package.xml
4545
DESTINATION share/${PROJECT_NAME}
4646
)
4747

48+
if(BUILD_TESTING)
49+
find_package(ament_lint_auto REQUIRED)
50+
list(APPEND AMENT_LINT_AUTO_EXCLUDE
51+
ament_cmake_copyright
52+
ament_cmake_cpplint
53+
ament_cmake_uncrustify
54+
)
55+
ament_lint_auto_find_test_dependencies()
56+
endif()
57+
4858
# Specify install targets
4959
ament_package()

wireless_watcher/include/wireless_watcher/wireless_watcher.hpp

+25-23
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@
3333
*
3434
*/
3535

36-
#ifndef WIRELESS_WATCHER_HPP
37-
#define WIRELESS_WATCHER_HPP
36+
#ifndef WIRELESS_WATCHER__WIRELESS_WATCHER_HPP_
37+
#define WIRELESS_WATCHER__WIRELESS_WATCHER_HPP_
3838

3939
#include <string>
4040
#include <vector>
4141

42+
#include "diagnostic_updater/diagnostic_updater.hpp"
4243
#include "rclcpp/rclcpp.hpp"
4344
#include "std_msgs/msg/bool.hpp"
4445
#include "wireless_msgs/msg/connection.hpp"
@@ -48,31 +49,32 @@
4849
#define SIGNAL_STRENGTH_WEAK -67
4950
#define SIGNAL_STRENGTH_VERY_WEAK -75
5051

51-
class WirelessWatcher : public rclcpp::Node {
52+
class WirelessWatcher : public rclcpp::Node
53+
{
5254
public:
53-
WirelessWatcher();
55+
WirelessWatcher();
5456

5557
private:
56-
// Parameters
57-
double hz;
58-
std::string dev;
59-
std::string connected_topic;
60-
std::string connection_topic;
58+
// Parameters
59+
double hz;
60+
std::string dev;
61+
std::string connected_topic;
62+
std::string connection_topic;
6163

62-
// Other Variables
63-
rclcpp::TimerBase::SharedPtr timer_;
64-
rclcpp::Publisher<std_msgs::msg::Bool>::SharedPtr connected_pub_;
65-
rclcpp::Publisher<wireless_msgs::msg::Connection>::SharedPtr connection_pub_;
66-
std_msgs::msg::Bool connected_msg_;
67-
wireless_msgs::msg::Connection connection_msg_;
68-
diagnostic_updater::Updater updater_;
64+
// Other Variables
65+
rclcpp::TimerBase::SharedPtr timer_;
66+
rclcpp::Publisher<std_msgs::msg::Bool>::SharedPtr connected_pub_;
67+
rclcpp::Publisher<wireless_msgs::msg::Connection>::SharedPtr connection_pub_;
68+
std_msgs::msg::Bool connected_msg_;
69+
wireless_msgs::msg::Connection connection_msg_;
70+
diagnostic_updater::Updater updater_;
6971

70-
// Methods
71-
void timer_callback();
72-
std::string exec_cmd(const std::string& cmd);
73-
std::vector<std::string> split(const std::string& s, const std::string& delimiter);
74-
void diagnostic(diagnostic_updater::DiagnosticStatusWrapper & stat);
75-
void ip_address_diag(std::string dev, diagnostic_updater::DiagnosticStatusWrapper & stat);
72+
// Methods
73+
void timer_callback();
74+
std::string exec_cmd(const std::string& cmd);
75+
std::vector<std::string> split(const std::string& s, const std::string& delimiter);
76+
void diagnostic(diagnostic_updater::DiagnosticStatusWrapper & stat);
77+
void ip_address_diag(std::string dev, diagnostic_updater::DiagnosticStatusWrapper & stat);
7678
};
7779

78-
#endif // WIRELESS_WATCHER_HPP
80+
#endif // WIRELESS_WATCHER__WIRELESS_WATCHER_HPP_

wireless_watcher/launch/watcher.launch.py

+43-39
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
# Copyright 2022 Clearpath Robotics, Inc.
2-
#
31
# Software License Agreement (BSD)
42
#
53
# @author Roni Kreinin <[email protected]>
64
# @copyright (c) 2022, Clearpath Robotics, Inc., All rights reserved.
75
#
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.
1616
#
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
2427
# POSSIBILITY OF SUCH DAMAGE.
2528

2629

@@ -31,34 +34,35 @@
3134
from launch_ros.actions import Node
3235

3336
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'),
4446
]
4547

4648

4749
def generate_launch_description():
4850

4951
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+
)
6266

6367
ld = LaunchDescription(ARGUMENTS)
6468
ld.add_action(watcher)

wireless_watcher/package.xml

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@
44
<name>wireless_watcher</name>
55
<version>1.1.4</version>
66
<description>A node which publishes connection information about a linux wireless interface.</description>
7-
8-
<author>Mike Purvis</author>
9-
10-
<maintainer email="[email protected]">rkreinin</maintainer>
7+
8+
<maintainer email="[email protected]">Roni Kreinin</maintainer>
119
<maintainer email="[email protected]">Tony Baltovski</maintainer>
1210

1311
<license>BSD</license>
1412

13+
<author email="[email protected]">Mike Purvis</author>
14+
1515
<depend>diagnostic_updater</depend>
1616
<depend>rclcpp</depend>
1717
<depend>wireless_msgs</depend>
1818
<depend>wireless-tools</depend>
1919

20+
<test_depend>ament_lint_auto</test_depend>
21+
<test_depend>ament_lint_common</test_depend>
22+
2023
<export>
2124
<build_type>ament_cmake</build_type>
2225
</export>

0 commit comments

Comments
 (0)