Compare commits

..
4 Commits
Author SHA1 Message Date
Pablo Garrido 4a750220d2 3.0.2 2022-05-25 09:09:39 +02:00
Pablo Garrido b5a0d0b6ee Update changelog 2022-05-25 09:09:27 +02:00
Antonio Cuadros 114a043ee2 Revert test humble release (#142) 2022-05-24 11:11:32 +02:00
Antonio CuadrosandPablo Garrido b0ebf5ab3f Humble release (#135)
* Modify CI

* Update

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

* Update

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

* Update .github/workflows/ci.yml

* Update .github/workflows/ci.yml

* Modify CI

* Update to ubuntu latest

* Use pre-release repository

* Use ubuntu-20.04

* Fix

* Revert changes

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
2022-05-20 12:35:11 +02:00
8 changed files with 37 additions and 76 deletions
+10 -10
View File
@@ -3,27 +3,27 @@ name: CI micro-ROS Agent
on:
pull_request:
branches:
- 'jazzy'
- 'humble'
schedule:
- cron: '33 6 * * *'
jobs:
microros_agent_ci:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ros_distribution: [ jazzy ]
os: [ ubuntu-20.04 ]
ros_distribution: [ humble ]
include:
- docker_image: ubuntu:24.04
ros_distribution: jazzy
- docker_image: ubuntu:jammy
ros_distribution: humble
container:
image: ${{ matrix.docker_image }}
image: ubuntu:jammy
steps:
- uses: actions/checkout@v4
- uses: ros-tooling/setup-ros@0.7.13
- uses: actions/checkout@v2
- uses: ros-tooling/setup-ros@0.3.2
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.4.3
- uses : ros-tooling/action-ros-ci@0.2.5
with:
package-name: "micro_ros_agent"
target-ros2-distro: ${{ matrix.ros_distribution }}
+1 -24
View File
@@ -2,30 +2,7 @@
Changelog for package micro-ros_agent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5.0.2 (2024-05-31)
------------------
* Jazzy Release
* Bump Micro XRCE-DDS Agent (`#226 <https://github.com/micro-ROS/micro-ROS-Agent/issues/226>`_)
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>`_)
4.0.0 (2022-05-25)
3.0.2 (2022-05-25)
------------------
3.0.1 (2022-03-25)
+1 -1
View File
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.5)
option(UROSAGENT_GENERATE_PROFILE
"Generates agent.refs according to the .msgs provided in the .repos" OFF
+1 -1
View File
@@ -26,7 +26,7 @@ if(NOT xrceagent_FOUND)
GIT_REPOSITORY
https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
GIT_TAG
v2.4.3
ros2
PREFIX
${PROJECT_BINARY_DIR}/agent
INSTALL_DIR
@@ -65,7 +65,6 @@
#include <string>
#include <memory>
#include <map>
#include <thread>
namespace uros {
namespace agent {
@@ -112,12 +111,6 @@ public:
const eprosima::fastdds::dds::DomainParticipant* participant,
bool from_microros = true);
/**
* @brief Getter for the graph cache.
* @return Reference to inner graph cache
*/
rmw_dds_common::GraphCache& get_graph_cache() { return graphCache_; }
/**
* @brief Adds a DDS datawriter to the graph tree.
* @param datawriter_guid rtps::GUID_t of the datawriter to be added.
@@ -306,7 +299,7 @@ private:
// Store a auxiliary publishers and datawriter for each participant created in micro-ROS
std::map<
const eprosima::fastdds::dds::DomainParticipant*,
eprosima::fastdds::dds::DataWriter*
std::unique_ptr<eprosima::fastdds::dds::DataWriter>
> micro_ros_graph_datawriters_;
};
+3 -3
View File
@@ -2,10 +2,10 @@
<?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>5.0.2</version>
<version>3.0.2</version>
<description>micro-ROS Agent package</description>
<maintainer email="eugeniocollado@eprosima.com">Eugenio Collado</maintainer>
<maintainer email="carlosespinoza@eprosima.com">Carlos Espinoza</maintainer>
<maintainer email="pablogarrido@eprosima.com">Pablo Garrido</maintainer>
<maintainer email="antoniocuadros@eprosima.com">Antonio Cuadros</maintainer>
<license>Apache License 2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
@@ -125,11 +125,9 @@ 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();
});
@@ -146,7 +144,6 @@ inline void GraphManager::publish_microros_graph()
{
return this->graph_changed_;
});
graph_changed_ = false;
}
if (display_on_change_)
@@ -154,6 +151,7 @@ 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;
@@ -322,10 +320,11 @@ void GraphManager::add_participant(
if (it == micro_ros_graph_datawriters_.end())
{
// Create datawriter
eprosima::fastdds::dds::DataWriter * datawriter = publisher_->create_datawriter(ros_discovery_topic_.get(), datawriter_qos_);
std::unique_ptr<eprosima::fastdds::dds::DataWriter> datawriter;
datawriter.reset(publisher_->create_datawriter(ros_discovery_topic_.get(), datawriter_qos_));
it = micro_ros_graph_datawriters_.insert(
std::make_pair(participant, datawriter)).first;
std::make_pair(participant, std::move(datawriter))).first;
}
it->second->write(static_cast<void *>(&info));
@@ -345,9 +344,8 @@ 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);
}
micro_ros_graph_datawriters_.erase(participant);
}
void GraphManager::add_datawriter(
@@ -374,8 +372,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,
rosidl_get_zero_initialized_type_hash(), participant_gid, qos_profile, false);
graphCache_.add_entity(datawriter_gid, topic_name,
type_name, participant_gid, qos_profile, false);
}
void GraphManager::remove_datawriter(
@@ -411,13 +409,8 @@ void GraphManager::add_datareader(
"rmw_fastrtps_cpp", participant_guid);
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(reader_qos);
// 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);
graphCache_.add_entity(datareader_gid, topic_name,
type_name, participant_gid, qos_profile, true);
}
void GraphManager::remove_datareader(
@@ -604,7 +597,7 @@ GraphManager::ParticipantListener::ParticipantListener(
}
void GraphManager::ParticipantListener::on_participant_discovery(
eprosima::fastdds::dds::DomainParticipant* /* participant */,
eprosima::fastdds::dds::DomainParticipant* participant,
eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info)
{
switch (info.status)
@@ -621,15 +614,13 @@ void GraphManager::ParticipantListener::on_participant_discovery(
const std::string enclave =
std::string(name_found->second.begin(), name_found->second.end());
const rmw_gid_t gid = rmw_fastrtps_shared_cpp::create_rmw_gid("rmw_fastrtps_cpp", info.info.m_guid);
graphManager_from_->get_graph_cache().add_participant(gid, enclave);
graphManager_from_->add_participant(participant, false, enclave);
break;
}
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT:
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DROPPED_PARTICIPANT:
{
const rmw_gid_t gid = rmw_fastrtps_shared_cpp::create_rmw_gid("rmw_fastrtps_cpp", info.info.m_guid);
graphManager_from_->get_graph_cache().remove_participant(gid);
graphManager_from_->remove_participant(participant, false);
break;
}
default:
@@ -54,14 +54,14 @@ bool ParticipantEntitiesInfoTypeSupport::serialize(
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
payload->max_size);
eprosima::fastcdr::Cdr scdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::DDS_CDR);
eprosima::fastcdr::Cdr::DDS_CDR);
scdr.serialize_encapsulation();
if (callbacks_->cdr_serialize(data, scdr))
{
payload->encapsulation = (scdr.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS) ?
CDR_BE : CDR_LE;
payload->length = static_cast<uint32_t>(scdr.get_serialized_data_length());
payload->length = static_cast<uint32_t>(scdr.getSerializedDataLength());
return true;
}
else
@@ -77,7 +77,7 @@ bool ParticipantEntitiesInfoTypeSupport::deserialize(
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
payload->length);
eprosima::fastcdr::Cdr dcdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::DDS_CDR);
eprosima::fastcdr::Cdr::DDS_CDR);
dcdr.read_encapsulation();
return callbacks_->cdr_deserialize(dcdr, data);
@@ -146,14 +146,14 @@ bool MicrorosGraphInfoTypeSupport::serialize(
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
payload->max_size);
eprosima::fastcdr::Cdr scdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::DDS_CDR);
eprosima::fastcdr::Cdr::DDS_CDR);
scdr.serialize_encapsulation();
if (callbacks_->cdr_serialize(data, scdr))
{
payload->encapsulation = (scdr.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS) ?
CDR_BE : CDR_LE;
payload->length = static_cast<uint32_t>(scdr.get_serialized_data_length());
payload->length = static_cast<uint32_t>(scdr.getSerializedDataLength());
return true;
}
else
@@ -169,7 +169,7 @@ bool MicrorosGraphInfoTypeSupport::deserialize(
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
payload->length);
eprosima::fastcdr::Cdr dcdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::DDS_CDR);
eprosima::fastcdr::Cdr::DDS_CDR);
dcdr.read_encapsulation();
return callbacks_->cdr_deserialize(dcdr, data);