Compare commits

..
11 Commits
Author SHA1 Message Date
Pablo Garrido 7f0af6b953 5.0.1 2024-01-29 16:26:30 +01:00
Pablo Garrido 7372bbe5bd Changelog 2024-01-29 16:26:11 +01:00
mergify[bot]andPablo Garrido a88be1bbbb Fix thread include (#216) (#218)
* Fix thread include

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update CI

* Revert "Fix thread include"

This reverts commit 1427fb6246.

* fix

* Fix

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

---------

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit cd321caabe)

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
2024-01-29 16:25:39 +01:00
Antonio Cuadros 92b7343d1a Update CI branch name (#193)
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
2023-06-06 11:36:34 +02:00
acuadros95 e6b928b1e1 5.0.0 2023-06-06 09:25:33 +00:00
acuadros95 4c98e4f9f5 Changelog
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
2023-06-06 09:24:56 +00:00
Antonio Cuadros 964b0aec1a Add empty type key hash to GraphCache (#189)
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
2023-06-06 11:11:24 +02:00
Pablo Garrido 03946126dd 4.0.2 2022-09-28 15:58:41 +02:00
Pablo Garrido 0142528a73 Changelog 2022-09-28 15:58:35 +02:00
mergify[bot]andPablo Garrido 53ff7d409d Fix Datawriter destruction (#169) (#170)
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit 4f686e8dc1)

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
2022-08-23 13:08:35 +02:00
mergify[bot]andcmraaron 9e9167b0d7 Synchronise predicate (#160) (#165)
* ensure synchronised access to our predicate

Signed-off-by: Aaron <aaron.lipinski@cm-robotics.com>

* release lock before signalling

Signed-off-by: Aaron <aaron.lipinski@cm-robotics.com>

Signed-off-by: Aaron <aaron.lipinski@cm-robotics.com>
(cherry picked from commit d4be840332)

Co-authored-by: cmraaron <102722879+cmraaron@users.noreply.github.com>
2022-08-19 09:27:21 +02:00
5 changed files with 40 additions and 18 deletions
+5 -5
View File
@@ -3,7 +3,7 @@ name: CI micro-ROS Agent
on:
pull_request:
branches:
- 'main'
- 'rolling'
schedule:
- cron: '33 6 * * *'
@@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
os: [ ubuntu-latest ]
ros_distribution: [ rolling ]
include:
- docker_image: ubuntu:22.04
@@ -22,8 +22,8 @@ jobs:
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v2
- uses: ros-tooling/setup-ros@0.3.2
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@0.7.1
with:
use-ros2-testing: false
required-ros-distributions: ${{ matrix.ros_distribution }}
@@ -31,7 +31,7 @@ jobs:
run: |
apt-get install ros-${{ matrix.ros_distribution }}-micro-ros-msgs
apt-get install ros-${{ matrix.ros_distribution }}-rmw-fastrtps-cpp
- uses : ros-tooling/action-ros-ci@0.2.5
- uses : ros-tooling/action-ros-ci@0.3.6
with:
package-name: "micro_ros_agent"
target-ros2-distro: ${{ matrix.ros_distribution }}
+14
View File
@@ -2,6 +2,20 @@
Changelog for package micro-ros_agent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5.0.1 (2024-01-29)
------------------
* Fix thread include (`#216 <https://github.com/micro-ROS/micro-ROS-Agent/issues/216>`_) (`#218 <https://github.com/micro-ROS/micro-ROS-Agent/issues/218>`_)
5.0.0 (2023-06-06)
------------------
* Add empty type key hash to GraphCache (`#189 <https://github.com/micro-ROS/micro-ROS-Agent/issues/189>`_)
* Contributors: Antonio Cuadros
4.0.2 (2022-09-28)
------------------
* Fix Datawriter destruction (`#169 <https://github.com/micro-ROS/micro-ROS-Agent/issues/169>`_) (`#170 <https://github.com/micro-ROS/micro-ROS-Agent/issues/170>`_)
* Synchronise predicate (`#160 <https://github.com/micro-ROS/micro-ROS-Agent/issues/160>`_) (`#165 <https://github.com/micro-ROS/micro-ROS-Agent/issues/165>`_)
4.0.1 (2022-06-13)
------------------
* Fix memory leak in graph manager (`#147 <https://github.com/micro-ROS/micro-ROS-Agent/issues/147>`_) (`#148 <https://github.com/micro-ROS/micro-ROS-Agent/issues/148>`_)
@@ -65,6 +65,7 @@
#include <string>
#include <memory>
#include <map>
#include <thread>
namespace uros {
namespace agent {
@@ -305,7 +306,7 @@ private:
// Store a auxiliary publishers and datawriter for each participant created in micro-ROS
std::map<
const eprosima::fastdds::dds::DomainParticipant*,
std::unique_ptr<eprosima::fastdds::dds::DataWriter>
eprosima::fastdds::dds::DataWriter*
> micro_ros_graph_datawriters_;
};
+1 -1
View File
@@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>micro_ros_agent</name>
<version>4.0.1</version>
<version>5.0.1</version>
<description>micro-ROS Agent package</description>
<maintainer email="pablogarrido@eprosima.com">Pablo Garrido</maintainer>
<maintainer email="antoniocuadros@eprosima.com">Antonio Cuadros</maintainer>
@@ -125,9 +125,11 @@ GraphManager::GraphManager(eprosima::fastdds::dds::DomainId_t domain_id)
// Set graph cache on change callback function
graphCache_.set_on_change_callback([this]()
{
{
std::unique_lock<std::mutex> lock(this->mtx_);
this->graph_changed_ = true;
}
this->cv_.notify_one();
});
@@ -144,6 +146,7 @@ inline void GraphManager::publish_microros_graph()
{
return this->graph_changed_;
});
graph_changed_ = false;
}
if (display_on_change_)
@@ -151,7 +154,6 @@ inline void GraphManager::publish_microros_graph()
std::cout << "Updated uros Graph: graph changed" << std::endl;
std::cout << graphCache_ << std::endl;
}
graph_changed_ = false;
micro_ros_msgs::msg::Graph graph_message;
@@ -320,11 +322,10 @@ void GraphManager::add_participant(
if (it == micro_ros_graph_datawriters_.end())
{
// Create datawriter
std::unique_ptr<eprosima::fastdds::dds::DataWriter> datawriter;
datawriter.reset(publisher_->create_datawriter(ros_discovery_topic_.get(), datawriter_qos_));
eprosima::fastdds::dds::DataWriter * datawriter = publisher_->create_datawriter(ros_discovery_topic_.get(), datawriter_qos_);
it = micro_ros_graph_datawriters_.insert(
std::make_pair(participant, std::move(datawriter))).first;
std::make_pair(participant, datawriter)).first;
}
it->second->write(static_cast<void *>(&info));
@@ -344,8 +345,9 @@ void GraphManager::remove_participant(
rmw_dds_common::convert_gid_to_msg(&gid, &info.gid);
auto it = micro_ros_graph_datawriters_.find(participant);
it->second->write(static_cast<void *>(&info));
}
publisher_->delete_datawriter(it->second);
micro_ros_graph_datawriters_.erase(participant);
}
}
void GraphManager::add_datawriter(
@@ -372,8 +374,8 @@ void GraphManager::add_datawriter(
"rmw_fastrtps_cpp", participant_guid);
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(writer_qos);
graphCache_.add_entity(datawriter_gid, topic_name,
type_name, participant_gid, qos_profile, false);
graphCache_.add_entity(datawriter_gid, topic_name, type_name,
rosidl_get_zero_initialized_type_hash(), participant_gid, qos_profile, false);
}
void GraphManager::remove_datawriter(
@@ -409,8 +411,13 @@ void GraphManager::add_datareader(
"rmw_fastrtps_cpp", participant_guid);
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(reader_qos);
graphCache_.add_entity(datareader_gid, topic_name,
type_name, participant_gid, qos_profile, true);
// TODO(acuadros95): Use typesupport to calculate type hash on micro-ROS and save and get it from reader_qos.user_data.
// Related PRs:
// https://github.com/ros2/rmw_dds_common/pull/70
// https://github.com/ros2/rmw_fastrtps/pull/671
// https://github.com/ros2/rmw_fastrtps/pull/680
graphCache_.add_entity(datareader_gid, topic_name, type_name,
rosidl_get_zero_initialized_type_hash(), participant_gid, qos_profile, true);
}
void GraphManager::remove_datareader(