Skip to content

Commit 62598dd

Browse files
committed
Added Github codeowners, issue template, CI. Also, fixed linting.
1 parent 79ce175 commit 62598dd

File tree

10 files changed

+449
-249
lines changed

10 files changed

+449
-249
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
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

Lines changed: 31 additions & 0 deletions
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

Lines changed: 14 additions & 0 deletions
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

Lines changed: 103 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<maintainer email="[email protected]">Roni Kreinin</maintainer>
1111
<maintainer email="[email protected]">Tony Baltovski</maintainer>
12-
12+
1313
<license>BSD</license>
1414

1515
<buildtool_depend>ament_cmake</buildtool_depend>

wireless_watcher/CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ Changelog for package wireless_watcher
100100

101101
0.0.1 (2013-10-17)
102102
------------------
103-
* Catkinize wireless_watcher
103+
* Catkinize wireless_watcher

wireless_watcher/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,32 @@
4848
#define SIGNAL_STRENGTH_WEAK -67
4949
#define SIGNAL_STRENGTH_VERY_WEAK -75
5050

51-
class WirelessWatcher : public rclcpp::Node {
51+
class WirelessWatcher : public rclcpp::Node
52+
{
5253
public:
53-
WirelessWatcher();
54+
WirelessWatcher();
5455

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

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_;
63+
// Other Variables
64+
rclcpp::TimerBase::SharedPtr timer_;
65+
rclcpp::Publisher<std_msgs::msg::Bool>::SharedPtr connected_pub_;
66+
rclcpp::Publisher<wireless_msgs::msg::Connection>::SharedPtr connection_pub_;
67+
std_msgs::msg::Bool connected_msg_;
68+
wireless_msgs::msg::Connection connection_msg_;
69+
diagnostic_updater::Updater updater_;
6970

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);
71+
// Methods
72+
void timer_callback();
73+
std::string exec_cmd(const std::string& cmd);
74+
std::vector<std::string> split(const std::string& s, const std::string& delimiter);
75+
void diagnostic(diagnostic_updater::DiagnosticStatusWrapper & stat);
76+
void ip_address_diag(std::string dev, diagnostic_updater::DiagnosticStatusWrapper & stat);
7677
};
7778

78-
#endif // WIRELESS_WATCHER_HPP
79+
#endif // WIRELESS_WATCHER_HPP

wireless_watcher/launch/watcher.launch.py

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or
1515
# promote products derived from this software without specific prior written permission.
1616
#
17-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED
1818
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
1919
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
2020
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
@@ -31,34 +31,35 @@
3131
from launch_ros.actions import Node
3232

3333
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'),
34+
DeclareLaunchArgument('hz', default_value='1.0', description='Update frequency'),
35+
DeclareLaunchArgument('dev', default_value='''', description='Wireless device'),
36+
DeclareLaunchArgument(
37+
'connected_topic', default_value='connected', description='Connected status topic'
38+
),
39+
DeclareLaunchArgument(
40+
'connection_topic', default_value='connection', description='Connection information topic'
41+
),
42+
DeclareLaunchArgument('namespace', default_value='', description='Namespace'),
4443
]
4544
4645
4746
def generate_launch_description():
4847
4948
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-
)
49+
package='wireless_watcher',
50+
executable='wireless_watcher',
51+
name='wireless_watcher',
52+
namespace=LaunchConfiguration('namespace'),
53+
output='screen',
54+
parameters=[
55+
{
56+
'hz': LaunchConfiguration('hz'),
57+
'dev': LaunchConfiguration('dev'),
58+
'connected_topic': LaunchConfiguration('connected_topic'),
59+
'connection_topic': LaunchConfiguration('connection_topic'),
60+
}
61+
],
62+
)
6263

6364
ld = LaunchDescription(ARGUMENTS)
6465
ld.add_action(watcher)

0 commit comments

Comments
 (0)