Skip to content

Commit

Permalink
Merge branch 'deb' into hw_api
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Aug 18, 2023
2 parents 57e3cd9 + 7fc4ddb commit a6cefea
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 95 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/noetic.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/ros_package_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ros_package_build

on:

push:
branches: [ hw_api ]

pull_request:
branches: [ hw_api ]

workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:

build:
uses: ctu-mrs/ci_scripts/.github/workflows/ros_package_build.yml@master
secrets:
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }}
81 changes: 46 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.1.2)
cmake_minimum_required(VERSION 3.5)
project(mrs_serial)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(catkin REQUIRED COMPONENTS
set(CATKIN_DEPENDENCIES
roscpp
cmake_modules
nodelet
Expand All @@ -15,18 +15,30 @@ find_package(catkin REQUIRED COMPONENTS
dynamic_reconfigure
)

find_package(catkin REQUIRED COMPONENTS
${CATKIN_DEPENDENCIES}
)

generate_dynamic_reconfigure_options(
config/gimbal.cfg
)

set(LIBRARIES
VioImu NmeaParser BacaProtocol Servo Led Estop Ultrasound TarotGimbal Gimbal
MrsSerial_VioImu
MrsSerial_NmeaParser
MrsSerial_BacaProtocol
MrsSerial_Servo
MrsSerial_Led
MrsSerial_Estop
MrsSerial_Ultrasound
MrsSerial_TarotGimbal
MrsSerial_Gimbal
)

catkin_package(
INCLUDE_DIRS include
LIBRARIES ${LIBRARIES}
CATKIN_DEPENDS roscpp sensor_msgs std_msgs mrs_msgs
CATKIN_DEPENDS ${CATKIN_DEPENDENCIES}
)

include_directories(
Expand All @@ -42,108 +54,108 @@ add_library(Eagle
src/serial_port.cpp
)

# VioImu
# MrsSerial_VioImu

add_library(VioImu
add_library(MrsSerial_VioImu
src/vio_imu.cpp
src/serial_port.cpp
)

target_link_libraries(VioImu
target_link_libraries(MrsSerial_VioImu
${catkin_LIBRARIES}
)

# NmeaParser
# MrsSerial_NmeaParser

add_library(NmeaParser
add_library(MrsSerial_NmeaParser
src/nmea_parser.cpp
src/serial_port.cpp
)

target_link_libraries(NmeaParser
target_link_libraries(MrsSerial_NmeaParser
${catkin_LIBRARIES}
)

# BacaProtocol
# MrsSerial_BacaProtocol

add_library(BacaProtocol
add_library(MrsSerial_BacaProtocol
src/baca_protocol.cpp
src/serial_port.cpp
)

target_link_libraries(BacaProtocol
target_link_libraries(MrsSerial_BacaProtocol
${catkin_LIBRARIES}
)

# Servo
# MrsSerial_Servo

add_library(Servo
add_library(MrsSerial_Servo
src/servo.cpp
src/serial_port.cpp
)

target_link_libraries(Servo
target_link_libraries(MrsSerial_Servo
${catkin_LIBRARIES}
)

# Led
# MrsSerial_Led

add_library(Led
add_library(MrsSerial_Led
src/led.cpp
src/serial_port.cpp
)

target_link_libraries(Led
target_link_libraries(MrsSerial_Led
${catkin_LIBRARIES}
)

# Estop
# MrsSerial_Estop

add_library(Estop
add_library(MrsSerial_Estop
src/estop.cpp
src/serial_port.cpp
)

target_link_libraries(Estop
target_link_libraries(MrsSerial_Estop
${catkin_LIBRARIES}
)

# Ultrasound
# MrsSerial_Ultrasound

add_library(Ultrasound
add_library(MrsSerial_Ultrasound
src/ultrasound.cpp
src/serial_port.cpp)

target_link_libraries(Ultrasound
target_link_libraries(MrsSerial_Ultrasound
${catkin_LIBRARIES}
)

# TarotGimbal
# MrsSerial_TarotGimbal

add_library(TarotGimbal
add_library(MrsSerial_TarotGimbal
src/tarot_gimbal.cpp
src/serial_port.cpp)

target_link_libraries(TarotGimbal
target_link_libraries(MrsSerial_TarotGimbal
${catkin_LIBRARIES}
)

# Gimbal
# MrsSerial_Gimbal

add_library(Gimbal
add_library(MrsSerial_Gimbal
src/gimbal.cpp
src/serial_port.cpp
src/SBGC_lib/SBGC_cmd_helpers.cpp
include/gimbal.hpp
)

add_dependencies(Gimbal
add_dependencies(MrsSerial_Gimbal
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
${PROJECT_NAME}_gencfg
)

target_link_libraries(Gimbal
target_link_libraries(MrsSerial_Gimbal
${catkin_LIBRARIES}
)

Expand All @@ -166,11 +178,10 @@ install(DIRECTORY tmux_scripts
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

install(DIRECTORY include/
install(DIRECTORY include
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
)

install(DIRECTORY ./
install(FILES nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
FILES_MATCHING PATTERN "*.xml"
)
20 changes: 10 additions & 10 deletions plugins.xml → nodelets.xml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
<library path="lib/libBacaProtocol">
<library path="lib/libMrsSerial_BacaProtocol">
<class name="baca_protocol/BacaProtocol" type="baca_protocol::BacaProtocol" base_class_type="nodelet::Nodelet">
<description>BacaProtocol nodelet</description>
</class>
</library>

<library path="lib/libNmeaParser">
<library path="lib/libMrsSerial_NmeaParser">
<class name="nmea_parser/NmeaParser" type="nmea_parser::NmeaParser" base_class_type="nodelet::Nodelet">
<description>NmeaParser nodelet</description>
</class>
</library>

<library path="lib/libEagle">
<library path="lib/libMrsSerial_Eagle">
<class name="eagle/Eagle" type="eagle::Eagle" base_class_type="nodelet::Nodelet">
<description>Eagle nodelet</description>
</class>
</library>

<library path="lib/libVioImu">
<library path="lib/libMrsSerial_VioImu">
<class name="vio_imu/VioImu" type="vio_imu::VioImu" base_class_type="nodelet::Nodelet">
<description>VioImu nodelet</description>
</class>
</library>

<library path="lib/libServo">
<library path="lib/libMrsSerial_Servo">
<class name="servo/Servo" type="servo::Servo" base_class_type="nodelet::Nodelet">
<description>Servo nodelet</description>
</class>
</library>

<library path="lib/libLed">
<library path="lib/libMrsSerial_Led">
<class name="led/Led" type="led::Led" base_class_type="nodelet::Nodelet">
<description>Led nodelet</description>
</class>
</library>

<library path="lib/libEstop">
<library path="lib/libMrsSerial_Estop">
<class name="estop/Estop" type="estop::Estop" base_class_type="nodelet::Nodelet">
<description>Estop nodelet</description>
</class>
</library>

<library path="lib/libUltrasound">
<library path="lib/libMrsSerial_Ultrasound">
<class name="ultrasound/Ultrasound" type="ultrasound::Ultrasound" base_class_type="nodelet::Nodelet">
<description>Ultrasound nodelet</description>
</class>
</library>

<library path="lib/libTarotGimbal">
<library path="lib/libMrsSerial_TarotGimbal">
<class name="tarot_gimbal/TarotGimbal" type="tarot_gimbal::TarotGimbal" base_class_type="nodelet::Nodelet">
<description>TarotGimbal nodelet</description>
</class>
</library>

<library path="lib/libGimbal">
<library path="lib/libMrsSerial_Gimbal">
<class name="gimbal/Gimbal" type="gimbal::Gimbal" base_class_type="nodelet::Nodelet">
<description>A basic driver for a gimbal over the SBGC-API protocol</description>
</class>
Expand Down
10 changes: 3 additions & 7 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
<package format="2">

<name>mrs_serial</name>
<version>0.0.1</version>
<version>1.0.0</version>
<description>driver for reading messages from serial line</description>

<author email="hertdani@fel.cvut.cz">Daniel Hert</author>
<maintainer email="hertdani@fel.cvut.cz">Daniel Hert</maintainer>
<maintainer email="Tomas.baca@fel.cvut.cz">Tomas Baca</maintainer>

<license>BSD 3-Clause</license>

<author email="hertdani@fel.cvut.cz">Daniel Hert</author>

<buildtool_depend>catkin</buildtool_depend>

<depend>roscpp</depend>
Expand All @@ -24,10 +23,7 @@
<depend>dynamic_reconfigure</depend>

<export>

<!-- The plugins.xml file defines nodelet as a plugin -->
<nodelet plugin="${prefix}/plugins.xml" />

<nodelet plugin="${prefix}/nodelets.xml" />
</export>

</package>

0 comments on commit a6cefea

Please sign in to comment.