Skip to content

Commit

Permalink
refactor: Port gnss_comm_msgs to ROS 2 in order to compile Vilens fro…
Browse files Browse the repository at this point in the history
…m source
  • Loading branch information
2b-t committed Dec 3, 2024
1 parent c31aad3 commit 6fa9a92
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 37 deletions.
42 changes: 20 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
cmake_minimum_required(VERSION 3.0.2)
cmake_minimum_required(VERSION 3.5)
project(gnss_comm_msgs)

# to make sure ccache produces colorized output.
add_compile_options(-fdiagnostics-color=always)

find_package(catkin REQUIRED COMPONENTS
message_generation
std_msgs
)
find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)

add_message_files(
FILES
GnssTimeMsg.msg
GnssEphemMsg.msg
GnssGloEphemMsg.msg
GnssMeasMsg.msg
GnssObsMsg.msg
GnssBestXYZMsg.msg
GnssPVTSolnMsg.msg
GnssSvsMsg.msg
GnssTimePulseInfoMsg.msg
StampedFloat64Array.msg
set(msg_files
"msg/GnssTimeMsg.msg"
"msg/GnssEphemMsg.msg"
"msg/GnssGloEphemMsg.msg"
"msg/GnssMeasMsg.msg"
"msg/GnssObsMsg.msg"
"msg/GnssBestXYZMsg.msg"
"msg/GnssPVTSolnMsg.msg"
"msg/GnssSvsMsg.msg"
"msg/GnssTimePulseInfoMsg.msg"
"msg/StampedFloat64Array.msg"
)

generate_messages(
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
DEPENDENCIES
std_msgs
)

catkin_package(
CATKIN_DEPENDS message_runtime
std_msgs
)
ament_export_dependencies(rosidl_default_runtime)
ament_package()
2 changes: 1 addition & 1 deletion msg/GnssBestXYZMsg.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Header header
std_msgs/Header header
float64[] pos
float64[] pos_sigma
float64[] vel
Expand Down
10 changes: 5 additions & 5 deletions msg/GnssEphemMsg.msg
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ uint32 iodc
uint32 health
uint32 code
float64 ura
float64 A
float64 a
float64 e
float64 i0
float64 omg
float64 OMG0
float64 M0
float64 omg0
float64 m0
float64 delta_n
float64 OMG_dot
float64 omg_dot
float64 i_dot
float64 cuc
float64 cus
Expand All @@ -31,5 +31,5 @@ float64 af1
float64 af2
float64 tgd0
float64 tgd1
float64 A_dot
float64 a_dot
float64 n_dot
4 changes: 2 additions & 2 deletions msg/GnssObsMsg.msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
GnssTimeMsg time # measurement time
uint32 sat # satellite ID (define by `sat_no` function in `gnss_utility.hpp`)
float64[] freqs # observed frequencies [Hz]
float64[] CN0 # carrier-to-noise density ratio (signal strength) [dB-Hz]
uint8[] LLI # lost-lock indicator (1=lost)
float64[] cn0 # carrier-to-noise density ratio (signal strength) [dB-Hz]
uint8[] lli # lost-lock indicator (1=lost)
uint8[] code # channel code
float64[] psr # pseudorange measurement [m]
float64[] psr_std # pseudorange standard deviation [m]
Expand Down
2 changes: 1 addition & 1 deletion msg/GnssSvsMsg.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Header header
std_msgs/Header header
uint32[] sat
uint32[] freqo
bool[] health
Expand Down
2 changes: 1 addition & 1 deletion msg/StampedFloat64Array.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A list of float values with timestamp

Header header
std_msgs/Header header
float64[] data
18 changes: 13 additions & 5 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<?xml version="1.0"?>
<package format="2">
<package format="3">
<name>gnss_comm_msgs</name>
<version>0.0.1</version>
<description>
Messages from GNSS receiver.
</description>
<maintainer email="beuchert@robots.ox.ac.uk">Jonas Beuchert</maintainer>
<maintainer email="tobit@robots.ox.ac.uk">Tobit Flatscher</maintainer>
<license>GPL-3.0</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<depend>builtin_interfaces</depend>
<depend>std_msgs</depend>
<exec_depend>rosidl_default_runtime</exec_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>

0 comments on commit 6fa9a92

Please sign in to comment.