Skip to content

Commit 25b5c34

Browse files
committed
Merge branch 'master' into feature/BB-791
2 parents 8f894ee + aecffec commit 25b5c34

45 files changed

Lines changed: 779 additions & 177 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/package.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@ on:
55
- master
66
jobs:
77
package:
8-
runs-on: ubuntu-16.04
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-18.04, [self-hosted,linux,arm64]]
12+
fail-fast: false
913
steps:
10-
- uses: actions/checkout@v1
11-
- name: Generate build number
12-
id: buildnumber
13-
uses: einaregilsson/build-number@v2
14-
with:
15-
token: ${{secrets.github_token}}
14+
- uses: AutoModality/action-clean@v1
15+
- uses: actions/checkout@v2
1616
- name: Package
1717
id: package
18-
uses: AutoModality/action-package-debian-ros@v1.1.1
18+
uses: AutoModality/action-package-debian-ros@v2.0.0
1919
with:
2020
branch: ${{ github.event.pull_request.head.ref }}
2121
pull-request-number: ${{ github.event.number }}
22-
build-number: ${{ steps.buildnumber.outputs.build_number }}
22+
build-number: ${{ github.run_number }}
23+
release-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_RELEASE_ENTITLEMENT }}
2324
- name: The generated package
2425
run: echo "The artifact is ${{ steps.package.outputs.artifact-path }}"
2526
- name: Deploy

.github/workflows/release.yml

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,73 @@ on:
44
branches:
55
- master
66
jobs:
7-
package:
8-
runs-on: ubuntu-16.04
7+
release:
8+
runs-on: ubuntu-18.04
99
steps:
10-
- uses: actions/checkout@v1
10+
- name: Checkout
11+
uses: actions/checkout@v2
1112
- name: Semantic Release
13+
id: semantic
1214
uses: cycjimmy/semantic-release-action@v2
13-
id: semantic # `id` for output variables
14-
with:
15-
semantic_version: 15.14.0
16-
extra_plugins: |
17-
@semantic-release/changelog@3.0.0
1815
env:
1916
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-
- name: Package
17+
- name: Write release result to file
18+
run: mkdir release
19+
- name: Write Published
20+
uses: christian-draeger/write-properties@1.0.1
21+
with:
22+
path: 'release.properties'
23+
property: 'published'
24+
value: ${{ steps.semantic.outputs.new_release_published }}
25+
- name: Write Version
26+
uses: christian-draeger/write-properties@1.0.1
2127
if: steps.semantic.outputs.new_release_published == 'true'
28+
with:
29+
path: 'release.properties'
30+
property: 'version'
31+
value: ${{ steps.semantic.outputs.new_release_version }}
32+
- name: Share release file with other jobs
33+
uses: actions/upload-artifact@v1
34+
with:
35+
name: release
36+
path: 'release.properties'
37+
release-package:
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
matrix:
41+
os: [ubuntu-18.04, [self-hosted,linux,arm64]]
42+
needs: release
43+
name: Package if released
44+
steps:
45+
- uses: AutoModality/action-clean@v1
46+
- name: Checkout
47+
uses: actions/checkout@v2
48+
- name: Download release
49+
uses: actions/download-artifact@v1
50+
with:
51+
name: release
52+
- name: Read Published
53+
id: published
54+
uses: christian-draeger/read-properties@1.0.1
55+
with:
56+
path: 'release/release.properties'
57+
property: 'published'
58+
- name: Read Version if published
59+
id: version
60+
if: steps.published.outputs.value == 'true'
61+
uses: christian-draeger/read-properties@1.0.1
62+
with:
63+
path: 'release/release.properties'
64+
property: 'version'
65+
- name: Package if published
66+
if: steps.published.outputs.value == 'true'
2267
id: package
23-
uses: AutoModality/action-package-debian-ros@v1.1.1
68+
uses: AutoModality/action-package-debian-ros@v2.0.0
2469
with:
25-
version: ${{ steps.semantic.outputs.new_release_version }}
26-
- name: The generated package
27-
run: echo "The artifact is ${{ steps.package.outputs.artifact-path }}"
28-
- name: Deploy
29-
if: steps.semantic.outputs.new_release_published == 'true'
70+
version: ${{ steps.version.outputs.value }}
71+
release-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_RELEASE_ENTITLEMENT }}
72+
- name: Deploy if published
73+
if: steps.published.outputs.value == 'true'
3074
id: deploy
3175
uses: AutoModality/action-cloudsmith@0.2.0
3276
with:

.github/workflows/story.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ on:
66
- master
77
jobs:
88
build:
9-
runs-on: ubuntu-16.04
9+
runs-on: ubuntu-18.04
1010
steps:
11-
- uses: actions/checkout@v1
11+
- uses: actions/checkout@v2
1212
- name: Package
13-
uses: AutoModality/action-package-debian-ros@v1.1.1
13+
uses: AutoModality/action-package-debian-ros@v2.0.0
14+
with:
15+
dev-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_DEV_ENTITLEMENT }}
16+
release-repo-entitlement: ${{ secrets.CLOUDSMITH_READ_RELEASE_ENTITLEMENT }}
17+
1418

1519

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ debian/ros-kinetic-*.debhelper.log
3737
debian/ros-kinetic-am-utils*
3838
debian/debhelper-build-stamp
3939
debian/source
40+
ros-*-am-utils-*
41+
debian/.debhelper
42+
debian/ros-*-am-utils*

CMakeLists.txt

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,16 @@ cmake_minimum_required(VERSION 2.8.3)
22
project(am_utils)
33

44
find_package(catkin REQUIRED COMPONENTS
5-
message_generation
65
geometry_msgs
76
nav_msgs
87
genmsg
98
std_msgs
109
sensor_msgs
1110
rosconsole
1211
rostime
12+
brain_box_msgs
1313
)
1414

15-
add_message_files(
16-
DIRECTORY msg
17-
FILES
18-
Latency_Image.msg
19-
Latency_LaserScan.msg
20-
Latency_Odometry.msg
21-
Latency_PointCloud.msg
22-
Latency_PointCloud2.msg
23-
Latency_PoseStamped.msg
24-
Latency_PoseWithCovarianceStamped.msg
25-
Latency_TwistStamped.msg
26-
Latency_TwistWithCovarianceStamped.msg
27-
Latency.msg
28-
Latency_String.msg
29-
LatencyHeader.msg
30-
LatencyTest.msg
31-
DelayStats.msg
32-
)
33-
3415
generate_messages( DEPENDENCIES std_msgs nav_msgs geometry_msgs sensor_msgs)
3516

3617
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
@@ -39,11 +20,11 @@ catkin_package(
3920
INCLUDE_DIRS include include/am_utils
4021
LIBRARIES am_utils
4122
CATKIN_DEPENDS
42-
message_runtime
4323
geometry_msgs
4424
nav_msgs
4525
std_msgs
4626
sensor_msgs
27+
brain_box_msgs
4728
)
4829

4930
include_directories(
@@ -55,10 +36,24 @@ install(DIRECTORY include/${PROJECT_NAME}/
5536
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
5637

5738
add_library(am_utils
58-
src/latency_wrapper.cpp src/am_statistics.cpp src/topics.cpp src/cansocket.cpp src/am_onlinestatistics.cpp
39+
src/am_bag_utils.cpp
40+
src/am_network_utils.cpp
41+
src/am_onlinestatistics.cpp
42+
src/am_operator_utils.cpp
43+
src/am_statistics.cpp
44+
src/cansocket.cpp
45+
src/fcu_mode_type.cpp
46+
src/flightplan_type.cpp
47+
src/latency_wrapper.cpp
48+
src/message_util.cpp
49+
src/mission_cmd_type.cpp
50+
src/operator_msg_type.cpp
51+
src/topics.cpp
5952
)
53+
6054
target_link_libraries(am_utils ${catkin_LIBRARIES})
61-
add_dependencies(am_utils am_utils_generate_messages_cpp)
55+
56+
add_dependencies(am_utils brain_box_msgs_generate_messages_cpp)
6257

6358
install(TARGETS am_utils
6459
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
A common library for sharing core code.
44

55

6+
67
| Github Action | Debian Package |
78
| ------------- | ------------- |
89
| [![Story Development](https://github.com/AutoModality/am-utils/workflows/Story%20Development/badge.svg)](https://github.com/AutoModality/am-utils/actions?query=workflow%3A%22Story+Development%22) | -- |
@@ -29,13 +30,11 @@ debian/rules build
2930

3031
Build with debian in docker.
3132

32-
```
33-
3433

3534
## Package
3635

3736
Runs `Build` and packages for installation.
3837

3938
## Releases
4039

41-
See [releases](https://github.com/AutoModality/am-utils/releases) for the latest. Follows the standard [Development Lifecycle](https://automodality.atlassian.net/wiki/spaces/AUTOMOD/pages/668664251/Development+Lifecycle).
40+
See [releases](https://github.com/AutoModality/am-utils/releases) for the latest. Follows the standard [Development Lifecycle](https://automodality.atlassian.net/wiki/spaces/AUTOMOD/pages/668664251/Development+Lifecycle).

debian/changelog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ros-kinetic-am-utils (999.9.9-local) unstable; urgency=low
2+
3+
[ Nobody ]
4+
* local changes only
5+
This file will be overwritten
6+
7+
-- Developer <nobody@nowhere.com> Mon, 21 Feb 2011 14:30:22 +0100
8+
9+
10+

debian/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Source: ros-kinetic-am-utils
22
Section: misc
33
Priority: extra
44
Maintainer: info <info@automodality.com>
5-
Build-Depends: debhelper (>= 9.0.0), ros-kinetic-catkin, ros-kinetic-geometry-msgs, ros-kinetic-message-generation, ros-kinetic-nav-msgs, ros-kinetic-rosconsole, ros-kinetic-roscpp, ros-kinetic-rostime, ros-kinetic-sensor-msgs, ros-kinetic-std-msgs
5+
Build-Depends: debhelper (>= 9.0.0), ros-kinetic-catkin, ros-kinetic-geometry-msgs, ros-kinetic-message-generation, ros-kinetic-nav-msgs, ros-kinetic-rosconsole, ros-kinetic-roscpp, ros-kinetic-rostime, ros-kinetic-sensor-msgs, ros-kinetic-std-msgs, ros-kinetic-am-msgs, ros-kinetic-uuid-msgs
66
Homepage: https://github.com/AutoModality/am-utils
77
Standards-Version: 3.9.2
88

99
Package: ros-kinetic-am-utils
1010
Architecture: any
11-
Depends: ${shlibs:Depends}, ${misc:Depends}, ros-kinetic-geometry-msgs, ros-kinetic-message-runtime, ros-kinetic-nav-msgs, ros-kinetic-rosconsole, ros-kinetic-roscpp, ros-kinetic-rostime, ros-kinetic-sensor-msgs, ros-kinetic-std-msgs
11+
Depends: ${shlibs:Depends}, ${misc:Depends}, ros-kinetic-geometry-msgs, ros-kinetic-message-runtime, ros-kinetic-nav-msgs, ros-kinetic-rosconsole, ros-kinetic-roscpp, ros-kinetic-rostime, ros-kinetic-sensor-msgs, ros-kinetic-std-msgs, ros-kinetic-am-msgs, ros-kinetic-uuid-msgs
1212
Description: The am utils package

include/am_utils/am_bag_utils.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* am_bag_utils.cpp
3+
*
4+
* Created on: Sep 3, 2015
5+
* Author: dan
6+
*/
7+
8+
#ifndef BRAIN_BOX_MSGS_INCLUDE_BRAIN_BOX_MSGS_AM_BAG_UTILS_CPP_
9+
#define BRAIN_BOX_MSGS_INCLUDE_BRAIN_BOX_MSGS_AM_BAG_UTILS_CPP_
10+
11+
#include <ros/ros.h>
12+
13+
namespace brain_box {
14+
15+
class AMBagUtils {
16+
public:
17+
static std::string getFileName();
18+
};
19+
20+
} /* namespace brain_box */
21+
22+
#endif /* BRAIN_BOX_MSGS_INCLUDE_BRAIN_BOX_MSGS_AM_BAG_UTILS_CPP_ */
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* am_network_utils.h
3+
*
4+
* Created on: Jun 2, 2015
5+
* Author: dan
6+
*/
7+
8+
#ifndef BRAIN_BOX_MSGS_SRC_AM_NETWORK_UTILS_H_
9+
#define BRAIN_BOX_MSGS_SRC_AM_NETWORK_UTILS_H_
10+
11+
#include <sys/socket.h>
12+
13+
namespace brain_box {
14+
15+
class AMNetworkUtils {
16+
public:
17+
AMNetworkUtils();
18+
virtual ~AMNetworkUtils();
19+
static void *get_in_addr(struct sockaddr *sa);
20+
static void printSource(struct sockaddr_storage their_addr, socklen_t addr_len, long bytesReceived);
21+
static int openIncomingSocket(const char *name, const char *port);
22+
static int openOutgoingSocket(const char *name, const char *hostname, const char *port, struct addrinfo &addr);
23+
static void getMacAddress(std::string channel, std::string &macAddress);
24+
static void closeSocket(int sockfp);
25+
};
26+
27+
} /* namespace brain_box */
28+
29+
#endif /* BRAIN_BOX_MSGS_SRC_AM_NETWORK_UTILS_H_ */

0 commit comments

Comments
 (0)