Skip to content

Commit 9e57d02

Browse files
committed
Update Galactic branch with Gitlab files
1 parent c619d11 commit 9e57d02

File tree

13 files changed

+120
-80
lines changed

13 files changed

+120
-80
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The following VS Code `tasks.json` file was used:
3232
{
3333
"type": "shell",
3434
"label": "colcon build",
35-
"args":["source /opt/ros/foxy/setup.bash && cd ~/code/ros2_ws/ && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug && . install/setup.bash"],
35+
"args":["source /opt/ros/galactic/setup.bash && cd ~/code/ros2_ws/ && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug && . install/setup.bash"],
3636
},
3737
]
3838
}
@@ -60,7 +60,7 @@ This project is split into numerous modules, each in their own directory:
6060
A list of ROS topics published by this driver can be found in [the README](./README.md).
6161

6262
### Releases
63-
* Release versions of this driver reside in branches corresponding to the distribution of ROS they are designed for use with, e.g. `foxy` or `eloquent`.
63+
* Release versions of this driver reside in branches corresponding to the distribution of ROS they are designed for use with, e.g. `galactic` or `eloquent`.
6464
* Branches which are under development, and in the progress of updating the code for use with a new distribution of ROS, are suffixed with `-devel`, e.g. `galactic-devel`.
6565
* The `master` branch contains a release for the latest distribution of ROS.
6666
* The ROS driver uses [semantic versioning](https://semver.org/) for its version number.
@@ -112,7 +112,7 @@ Building the test program requires something like:
112112

113113
```bash
114114
# In the root directory of the compiled package, e.g. ~/ros_ws/
115-
. /opt/ros/foxy/setup.bash
115+
. /opt/ros/galactic/setup.bash
116116
. install/setup.sh
117117
colcon build
118118
```
@@ -131,9 +131,9 @@ This driver uses the `Boost.Test` framework for its unit tests. Each file in the
131131
Documentation on this unit testing framework, including an API reference and user's guide, can be found [here](https://www.boost.org/doc/libs/1_77_0/libs/test/doc/html/index.html).
132132

133133
## Learning ROS 2
134-
See the following short tutorials for a quality introduction to package development for ROS 2 (Foxy Fitzroy):
134+
See the following short tutorials for a quality introduction to package development for ROS 2 (Galactic Geochelone):
135135

136-
- [Installation](https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/).
136+
- [Installation](https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html).
137137
- [Create a workspace](https://index.ros.org/doc/ros2/Tutorials/Workspace/Creating-A-Workspace/).
138138
- [Create your first package](https://index.ros.org/doc/ros2/Tutorials/Creating-Your-First-ROS2-Package/).
139139
- [Create a simple publisher/subscriber pair](https://index.ros.org/doc/ros2/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber/#cpppubsub).

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# ROS2 Driver
22

3+
[![Pipeline_Status](https://gitlab.com/oxts/navigation/ros/oxts/badges/Galactic/pipeline.svg)](https://gitlab.com/oxts/navigation/ros/oxts/-/commits/Galactic)
4+
35
A ROS2 driver which allows an OxTS INS to interact with a wider ROS network. Where ROS is mentioned in this document, this is in reference to ROS2. References to ROS1 will be explicit.
46

5-
The ROS driver has been built with ROS release Foxy Fitzroy.
7+
The ROS driver has been built with ROS release Galactic Geochelone.
68

79
## Build from source
810

911
Dependencies:
1012

11-
- ROS2 (Foxy Fitzroy). (See [here](https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/) for an installation guide.)
13+
- ROS2 (Galactic Geochelone). (See [here](https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html) for an installation guide.)
1214

1315
```bash
1416
sudo apt install doxygen
@@ -18,7 +20,7 @@ pip3 install sphinx breathe sphinx_rtd_theme
1820
To build the driver:
1921

2022
```bash
21-
. /opt/ros/foxy/setup.bash # "." and "source" are interchangeable (unix)
23+
. /opt/ros/galactic/setup.bash # "." and "source" are interchangeable (unix)
2224
mkdir -p ros_ws/src
2325
cd ros_ws/src
2426
git clone https://github.com/OxfordTechnicalSolutions/oxts_ros2_driver
@@ -55,6 +57,14 @@ The currently available launch files are as follows:
5557
* `visualise.py` - Launches the driver, as well as `robot_state_publisher` and `rviz2` (the latter can be disabled with `use_rviz:=False`)
5658
* `run.py` - Only launches the driver, without `robot_state_publisher` and no `use_rviz` option
5759

60+
You can also override options from the configuration file at the command-line, e.g.:
61+
62+
```bash
63+
ros2 launch oxts run.py topic_prefix:=myprefix
64+
```
65+
66+
**Be aware that currently, this only works for some options.**
67+
5868
## Getting started
5969
For a basic tutorial on using this driver, see the ["getting started" guide](./Getting%20Started.md).
6070

@@ -87,7 +97,7 @@ The publisher node included in this driver opens a socket to receive NCOM messag
8797
* **ins/velocity** [geometry_msgs/msg/TwistStamped](http://docs.ros.org/en/noetic/api/geometry_msgs/html/msg/TwistStamped.html)
8898
Velocity of the INS, in the INS frame. (Linear velocity corresponds to measurements `IsoVoX`, `IsoVoY` and `IsoVoZ`, while angular velocity is `Wx`, `Wy` and `Wz`.)
8999

90-
* **ins/odometry** [nav_msgs/msg/Odometry](https://github.com/ros2/common_interfaces/blob/foxy/nav_msgs/msg/Odometry.msg)
100+
* **ins/odometry** [nav_msgs/msg/Odometry](https://github.com/ros2/common_interfaces/blob/galactic/nav_msgs/msg/Odometry.msg)
91101
Odometry data from the INS.
92102
- Position: In a local reference frame which, depending on your configuration, is defined either by:
93103
- The LRF in NCom (`RefLat`, `RefLon`, `RefAlt` and `RefHeading`).
@@ -97,7 +107,7 @@ The publisher node included in this driver opens a socket to receive NCOM messag
97107
- Linear Velocity: In the above reference frame, computed from `IsoVoX`, `IsoVoY` and `IsoVoZ`. (Does not yet have variances.)
98108
- Angular Velocity: In the above reference frame, computed from `Wx`, `Wy` and `Wz`. (Does not yet have variances.)
99109

100-
* **ins/path** [nav_msgs/msg/Path](https://github.com/ros2/common_interfaces/blob/foxy/nav_msgs/msg/Path.msg)
110+
* **ins/path** [nav_msgs/msg/Path](https://github.com/ros2/common_interfaces/blob/galactic/nav_msgs/msg/Path.msg)
101111
Path taken by the INS, this path contains all historical positions and orientations from the **ins/odometry** topic.
102112

103113
* **ins/time_reference** [sensor_msgs/msg/TimeReference](http://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/TimeReference.html)

oxts/launch/run.py

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,30 @@ def generate_launch_description():
2121
driver_param_path = os.path.join(driver_dir, "config", parameters_file_name)
2222
with open(driver_param_path, "r") as f:
2323
driver_params = yaml.safe_load(f)["oxts_driver"]["ros__parameters"]
24-
yaml_ncom = driver_params.pop("ncom", "")
24+
yaml_ncom = driver_params.pop("ncom", '""')
2525
yaml_prefix = driver_params.pop("topic_prefix", "ins")
26-
26+
yaml_ip = driver_params.pop("unit_ip","0.0.0.0")
27+
yaml_port = driver_params.pop("unit_port",3000)
28+
yaml_rate = driver_params.pop("ncom_rate",100)
29+
yaml_mode = driver_params.pop("timestamp_mode",0)
30+
2731
ins_param_path = os.path.join(ins_dir, "config", parameters_file_name)
2832
with open(ins_param_path, "r") as f:
2933
ins_params = yaml.safe_load(f)["oxts_ins"]["ros__parameters"]
30-
34+
yaml_frameid = ins_params.pop("frame_id","oxts_link")
35+
yaml_lrf = ins_params.pop("lrf_source",2)
36+
3137
use_sim_time = LaunchConfiguration("use_sim_time", default="False")
3238
wait_for_init = LaunchConfiguration("wait_for_init", default="True")
3339
ncom = LaunchConfiguration("ncom", default=yaml_ncom)
3440
topic_prefix = LaunchConfiguration("topic_prefix", default=yaml_prefix)
35-
41+
unit_ip = LaunchConfiguration("unit_ip",default=yaml_ip)
42+
unit_port = LaunchConfiguration("unit_port",default=yaml_port)
43+
ncom_rate = LaunchConfiguration("ncom_rate",default=yaml_rate)
44+
timestamp_mode = LaunchConfiguration("timestamp_mode",default=yaml_timestamp)
45+
46+
frame_id = LaunchConfiguration("frame_id",default=yaml_frameid)
47+
lrf_source = LaunchConfiguration("lrf_source",default=yaml_lrf)
3648
# declare launch arguments (this exposes the argument
3749
# to IncludeLaunchDescriptionand to the command line)
3850
declare_use_sim_time = DeclareLaunchArgument("use_sim_time", default_value="False")
@@ -47,7 +59,24 @@ def generate_launch_description():
4759
declare_prefix = DeclareLaunchArgument(
4860
"topic_prefix", default_value=yaml_prefix, description="Prefix to apply to all topics"
4961
)
50-
62+
declare_ip = DeclareLaunchArgument(
63+
"unit_ip", default_value=yaml_ip, description="Unit IP to connect to"
64+
)
65+
declare_port = DeclareLaunchArgument(
66+
"unit_port", default_value=str(yaml_port), description="Unit Port to connect to"
67+
)
68+
declare_rate = DeclareLaunchArgument(
69+
"ncom_rate", default_value=str(yaml_rate), description="Set ncom rate /Hz"
70+
)
71+
declare_mode = DeclareLaunchArgument(
72+
"timestamp_mode", default_value=str(yaml_timestamp), description="Set timestamp mode"
73+
)
74+
declare_frameid = DeclareLaunchArgument(
75+
"frame_id", default_value=yaml_frameid, description="Set id of frame"
76+
)
77+
declare_lrf = DeclareLaunchArgument(
78+
"lrf_source", default_value=str(yaml_lrf), description="Set the lrf source"
79+
)
5180
oxts_driver_node = Node(
5281
package="oxts_driver",
5382
executable="oxts_driver",
@@ -59,6 +88,10 @@ def generate_launch_description():
5988
{"wait_for_init": wait_for_init},
6089
{"topic_prefix": topic_prefix},
6190
{"ncom": ncom},
91+
{"unit_ip": unit_ip},
92+
{"unit_port": unit_port},
93+
{"ncom_rate": ncom_rate},
94+
{"timestamp_mode": timestamp_mode},
6295
],
6396
)
6497

@@ -71,6 +104,8 @@ def generate_launch_description():
71104
ins_params,
72105
{"use_sim_time": use_sim_time},
73106
{"topic_prefix": topic_prefix},
107+
{"frame_id": frame_id},
108+
{"lrf_source": lrf_source},
74109
],
75110
)
76111

@@ -81,6 +116,12 @@ def generate_launch_description():
81116
ld.add_action(declare_prefix)
82117
ld.add_action(declare_use_sim_time)
83118
ld.add_action(declare_wait_for_init)
119+
ld.add_action(declare_ip)
120+
ld.add_action(declare_port)
121+
ld.add_action(declare_rate)
122+
ld.add_action(declare_mode)
123+
ld.add_action(declare_frameid)
124+
ld.add_action(declare_lrf)
84125
# launch nodes
85126
ld.add_action(oxts_driver_node)
86127
ld.add_action(oxts_ins_node)

oxts/package.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<description>
77
ROS support for the OxTS RT/xNAV INS systems.
88
</description>
9-
<maintainer email="support@oxts.com">oxts</maintainer>
10-
<author>oxts</author>
9+
<maintainer email="smccarthy@oxts.com">smccarthy</maintainer>
10+
<author>Someone else maybe</author>
1111
<license>Apache 2.0</license>
12-
<url type="website">http://www.oxts.com</url>
12+
<url type="website">http://www.ros.org/wiki/velodyne</url>
1313
<url type="repository">https://github.com/OxfordTechnicalSolutions/oxts_ros2_driver</url>
1414
<url type="bugtracker">https://github.com/OxfordTechnicalSolutions/oxts_ros2_driver/issues</url> -->
1515

oxts_driver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ ament_target_dependencies(oxts_driver
3838
tf2
3939
tf2_kdl
4040
oxts_msgs)
41+
4142
target_include_directories(oxts_driver PUBLIC
4243
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
4344
PRIVATE ${Boost_INCLUDE_DIRS}
4445
$<INSTALL_INTERFACE:include>)
4546

46-
4747
install(TARGETS oxts_driver
4848
DESTINATION lib/${PROJECT_NAME})
4949

oxts_driver/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<name>oxts_driver</name>
55
<version>0.0.0</version>
66
<description>A ROS2 Driver to allow an OxTS INS to interact with a wider ROS network.</description>
7-
<maintainer email="support@oxts.com">oxts</maintainer>
7+
<maintainer email="smccarthy@oxts.com">smccarthy</maintainer>
88
<license>Apache 2.0</license>
99

1010
<buildtool_depend>ament_cmake</buildtool_depend>

oxts_ins/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<name>oxts_ins</name>
55
<version>0.0.0</version>
66
<description>A ROS2 node that takes NCom messages from the driver node and publishes INS messages.</description>
7-
<maintainer email="support@oxts.com">oxts</maintainer>
7+
<maintainer email="smccarthy@oxts.com">smccarthy</maintainer>
88
<license>Apache 2.0</license>
99

1010
<buildtool_depend>ament_cmake</buildtool_depend>

oxts_ins/urdf/small_core.stl

100755100644
File mode changed.

oxts_msgs/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<name>oxts_msgs</name>
55
<version>0.0.0</version>
66
<description>ROS2 message definitions for OxTS INSs.</description>
7-
<maintainer email="support@oxts.com">oxts</maintainer>
7+
<maintainer email="smccarthy@oxts.com">smccarthy</maintainer>
88
<license>Apache 2.0</license>
99

1010
<buildtool_depend>ament_cmake</buildtool_depend>

0 commit comments

Comments
 (0)