Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ name: Next-Gen Prototype CI

on:
push:
branches: [ main ]
branches: [ main, epic/next-gen-base ]
pull_request:
branches: [ main ]
branches: [ main, epic/next-gen-base ]
workflow_dispatch:

jobs:
ci-check:
name: Colcon Overlay Build & Test Suite
name: Colcon Overlay Build & Test Suite (${{ matrix.rmw_implementation }})
runs-on: ubuntu-latest
container:
image: ghcr.io/open-rmf/ros2_rust_base:jazzy

strategy:
fail-fast: false
matrix:
rmw_implementation:
- rmw_fastrtps_cpp
- rmw_cyclonedds_cpp

steps:
- name: Checkout Prototype Repository
uses: actions/checkout@v4
Expand All @@ -25,6 +33,9 @@ jobs:
source /opt/ros/jazzy/setup.bash
rosdep update
apt update
if [ "${{ matrix.rmw_implementation }}" = "rmw_cyclonedds_cpp" ]; then
apt install -y ros-jazzy-rmw-cyclonedds-cpp
fi
rosdep install --from-paths . --ignore-src -y --skip-keys="rclrs ament_cargo ament_python"
colcon build
shell: bash
Expand All @@ -34,6 +45,9 @@ jobs:
run: |
source /opt/ros/jazzy/setup.bash
source install/setup.bash
export ROS_LOCALHOST_ONLY=1
export RMW_IMPLEMENTATION=${{ matrix.rmw_implementation }}
colcon test --executor sequential --packages-select rmf_path_server_test rmf_reservation_tests --event-handlers console_direct+
colcon test-result --all
shell: bash

4 changes: 2 additions & 2 deletions bevy_ros2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl<T: MessageIDL + Debug> RosSubscription<T> {

let subscriber = node
.create_subscription(
topic.clone().reliable().transient_local().keep_all(),
topic.clone().reliable().transient_local().keep_last(10),
move |msg: T| {
debug!("Received a message on [{}]: {:?}", topic, msg);
*data_clone.lock().unwrap() = Some(msg.clone());
Expand Down Expand Up @@ -110,7 +110,7 @@ impl<T: MessageIDL + Debug> RosPublisher<T> {

pub fn new_transient_local(node: &Arc<NodeState>, topic: String) -> Self {
let publisher = node
.create_publisher(topic.reliable().transient_local().keep_all())
.create_publisher(topic.reliable().transient_local().keep_last(10))
.unwrap();

Self { publisher }
Expand Down
4 changes: 2 additions & 2 deletions path_server/rmf_path_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ pub fn start_path_server<P: MapfPlanner + 'static>(
let footprints_clone2 = Arc::clone(&footprints_clone);
let list_subscription = discovery_worker
.create_subscription::<rmf_prototype_msgs::msg::ParticipantList, _>(
"/destination/discovery",
"/destination/discovery".transient_local().reliable(),
move |_server: &mut DiscoveryServer<P>,
msg: rmf_prototype_msgs::msg::ParticipantList| {
if let Ok(mut map) = footprints_clone2.lock() {
Expand Down Expand Up @@ -590,7 +590,7 @@ pub fn start_path_server<P: MapfPlanner + 'static>(
let odom_sub = match server
.destinations_worker
.create_subscription::<Odometry, _>(
odom_topic.as_str(),
odom_topic.as_str().reliable(),
move |dest_server: &mut PlanServer<P>, odom_msg: Odometry| {
dest_server.handle_odometry(&robot_id_clone2, odom_msg);
},
Expand Down
3 changes: 2 additions & 1 deletion path_server/rmf_path_server/tests/test_map_subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ fn test_map_subscription() -> Result<(), Box<dyn std::error::Error>> {

let robot_id = "robot1";
let odom_topic = format!("{}/odom", robot_id);
let odom_pub = test_node.create_publisher::<Odometry>(odom_topic.as_str())?;
let odom_pub = test_node
.create_publisher::<Odometry>(odom_topic.as_str().reliable())?;
let dest_topic = format!("{}/destination", robot_id);
let dest_pub = test_node
.create_publisher::<Destination>(dest_topic.as_str().transient_local().reliable())?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def odom_callback(msg, r_name=name):
Odometry,
f'{name}/odom',
odom_callback,
qos_profile=self.reliable_transient_qos
qos_profile=10
)

def subscribe_to_plan(self, name):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ def r2_plan_cb(msg):

self.node.create_subscription(
Odometry, 'robot_1/odom', r1_odom_cb,
qos_profile=reliable_transient_qos
qos_profile=10
)
self.node.create_subscription(
Odometry, 'robot_2/odom', r2_odom_cb,
qos_profile=reliable_transient_qos
qos_profile=10
)
self.node.create_subscription(
Plan, 'robot_1/plan', r1_plan_cb,
Expand All @@ -207,7 +207,8 @@ def r2_plan_cb(msg):
discovery_qos = QoSProfile(
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)

discovery_pub = self.node.create_publisher(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from nav_msgs.msg import Odometry
import pytest
import rclpy
from rclpy.qos import DurabilityPolicy, HistoryPolicy, QoSProfile
from rclpy.qos import DurabilityPolicy, HistoryPolicy, QoSProfile, ReliabilityPolicy
from rmf_prototype_msgs.msg import (
Destination,
DestinationConstraints,
Expand Down Expand Up @@ -141,14 +141,14 @@ def r2_cb(msg):
Odometry,
'robot_1/odom',
r1_cb,
10
qos_profile=10
)

self.node.create_subscription(
Odometry,
'robot_2/odom',
r2_cb,
10
qos_profile=10
)

# Publishers for destinations
Expand All @@ -174,7 +174,8 @@ def r2_cb(msg):
discovery_qos = QoSProfile(
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)

discovery_pub = self.node.create_publisher(
Expand Down
4 changes: 2 additions & 2 deletions path_server/rmf_plan_executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"/destination/discovery"
.transient_local()
.reliable()
.keep_all(),
.keep_last(10),
move |executor: &mut PlanExecutor, msg: ParticipantList| {
let (added, removed) = tracker.update(&msg);
for robot_id in removed {
Expand Down Expand Up @@ -91,7 +91,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let plan_topic = robot_id.to_string() + "/plan";

let odom_sub = match server.executor_worker.create_subscription::<Odometry, _>(
odom_topic.as_str(),
odom_topic.as_str().reliable(),
move |executor: &mut PlanExecutor, msg: Odometry| {
executor.handle_odometry(&robot_id_clone, msg);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def test_overlapping_reservation(self):
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)
discovery_pub = self.node.create_publisher(
ParticipantList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def test_plan_generation_and_publication(self):
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)
discovery_pub = self.node.create_publisher(
ParticipantList,
Expand All @@ -142,7 +143,7 @@ def test_plan_generation_and_publication(self):
odom = self.create_odom(0.0, 0.0)

start_time = time.time()
timeout = 8.0
timeout = 15.0
while time.time() - start_time < timeout:
discovery_pub.publish(parts)
dest_pub.publish(dest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def setUpClass(cls):
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)

cls.destinations = {name: [] for name in ROBOT_NAMES}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def test_single_reservation(self):
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)
discovery_pub = self.node.create_publisher(
ParticipantList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def setUpClass(cls):
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)

# Per-robot message buffers and publishers.
Expand Down
5 changes: 3 additions & 2 deletions rmf_mock_robot_sim/rmf_mock_robot_sim/mock_robot_sim_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def __init__(self):
discovery_qos = QoSProfile(
depth=1,
durability=DurabilityPolicy.TRANSIENT_LOCAL,
history=HistoryPolicy.KEEP_LAST
history=HistoryPolicy.KEEP_LAST,
reliability=ReliabilityPolicy.RELIABLE,
)

reliable_transient_qos = QoSProfile(
Expand All @@ -95,7 +96,7 @@ def __init__(self):
self.odom_pub = self.create_publisher(
Odometry,
f'{self.robot_name}/odom',
qos_profile=reliable_transient_qos
qos_profile=10
)

self.progress_pub = self.create_publisher(
Expand Down
2 changes: 1 addition & 1 deletion rmf_participant_discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ where
{
let mut tracker = ParticipantTracker::new();
worker.create_subscription::<ParticipantList, _>(
topic.transient_local().reliable().keep_all(),
topic.transient_local().reliable().keep_last(10),
move |server: &mut T, msg: ParticipantList| {
let (added, removed) = tracker.update(&msg);

Expand Down
Loading