Compare commits

..
23 Commits
Author SHA1 Message Date
Raul Sanchez-Mateos Lizano c93ee764e0 Revert "Fix 'microxrcedds_agent' name and dependency (backport #279) (#282)" (#285)
This reverts commit 8a667600dc.
2026-09-04 20:00:14 +02:00
mergify[bot]andDavid Laseca Perez 8a667600dc Fix 'microxrcedds_agent' name and dependency (backport #279) (#282)
* Fix 'microxrcedds_agent' name and dependency (#279)

Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
(cherry picked from commit 5e42d6ab6f)

* Fix conflicts

Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>

---------

Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Co-authored-by: David Laseca Perez <davidlaseca@eprosima.com>
2026-09-03 15:24:18 +02:00
mergify[bot]andDavid-LP99 4d6b873a06 Update maintainers (#275) (#276)
(cherry picked from commit 0c054f3fad)

Signed-off-by: David Laseca Perez <davidlaseca@eprosima.com>
Co-authored-by: David-LP99 <davidlaseca@eprosima.com>
2026-08-31 09:56:44 +02:00
mergify[bot]andAntón Casas 4f363a79ae Update maintainers (#259) (#260)
(cherry picked from commit e733b4b0a1)

Co-authored-by: Antón Casas <antoncasas@eprosima.com>
2025-09-16 09:34:39 +02:00
mergify[bot]andAntón Casas 48fa98a921 Bump setup-ros and action-ros-ci (backport #249) (#251)
* Bump setup-ros and action-ros-ci (#249)

Signed-off-by: Antón Casas <antoncasas@eprosima.com>
(cherry picked from commit 0e6e8e3673)

# Conflicts:
#	.github/workflows/ci.yml

* Merge conflicts

Signed-off-by: Antón Casas <antoncasas@eprosima.com>

---------

Signed-off-by: Antón Casas <antoncasas@eprosima.com>
Co-authored-by: Antón Casas <antoncasas@eprosima.com>
2025-06-03 11:20:04 +02:00
Pablo Garrido 30377bbd86 Fix Micro XRCE-DDS Agent tag (#241) 2024-11-25 19:21:46 +01:00
Pablo Garrido 1cb265e752 3.0.6 2024-01-29 16:27:35 +01:00
Pablo Garrido bd9cc7ef49 Changelog 2024-01-29 16:27:30 +01:00
mergify[bot]andPablo Garrido dd37f06a86 Fix thread include (backport #216) (#217)
* Fix thread include (#216)

* 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)

# Conflicts:
#	.github/workflows/ci.yml

* Fix conflicts

---------

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
2024-01-29 16:27:06 +01:00
acuadros95 1b815304e9 3.0.5 2023-06-06 09:41:33 +00:00
acuadros95 7ddbf4d245 Changelog
Signed-off-by: acuadros95 <acuadros1995@gmail.com>
2023-06-06 09:41:25 +00:00
Pablo Garrido 0e41ea6522 3.0.4 2022-09-28 15:57:21 +02:00
Pablo Garrido d1b916ced2 Changelog 2022-09-28 15:57:04 +02:00
Pablo Garrido 4f686e8dc1 Fix Datawriter destruction (#169)
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
2022-08-23 12:42:03 +02:00
cmraaron d4be840332 Synchronise predicate (#160)
* 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>
2022-08-19 09:17:36 +02:00
Pablo Garrido da7fb682e9 3.0.3 2022-06-13 07:46:16 +02:00
Pablo Garrido c1e0ce9df7 Changelog
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
2022-06-13 07:46:11 +02:00
Antonio Cuadros 5f36f4c943 Build ROS2 from source on snap (#153)
* Build ROS2 from source on snap

* Update
2022-06-09 15:38:17 +02:00
Pablo Garrido c89776e1fd Fix memory leak in graph manager (#147)
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
2022-06-08 14:12:55 +02:00
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
10 changed files with 108 additions and 62 deletions
+9 -9
View File
@@ -3,27 +3,27 @@ name: CI micro-ROS Agent
on:
pull_request:
branches:
- 'main'
- 'humble'
schedule:
- cron: '33 6 * * *'
jobs:
microros_agent_ci:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04 ]
ros_distribution: [ rolling ]
ros_distribution: [ humble ]
include:
- docker_image: ubuntu:22.04
ros_distribution: rolling
- docker_image: ubuntu:jammy
ros_distribution: humble
container:
image: ubuntu:22.04
image: ubuntu:jammy
steps:
- uses: actions/checkout@v2
- uses: ros-tooling/setup-ros@0.3.2
- uses: actions/checkout@v4
- uses: ros-tooling/setup-ros@0.7.13
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.4.3
with:
package-name: "micro_ros_agent"
target-ros2-distro: ${{ matrix.ros_distribution }}
+17 -1
View File
@@ -2,7 +2,23 @@
Changelog for package micro-ros_agent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4.0.0 (2022-05-25)
3.0.6 (2024-01-29)
------------------
* Fix thread include (backport `#216 <https://github.com/micro-ROS/micro-ROS-Agent/issues/216>`_) (`#217 <https://github.com/micro-ROS/micro-ROS-Agent/issues/217>`_)
3.0.5 (2023-06-06)
------------------
3.0.4 (2022-09-28)
------------------
* Fix Datawriter destruction (`#169 <https://github.com/micro-ROS/micro-ROS-Agent/issues/169>`_)
* Synchronise predicate (`#160 <https://github.com/micro-ROS/micro-ROS-Agent/issues/160>`_)
3.0.3 (2022-06-13)
------------------
* Fix memory leak in graph manager (`#147 <https://github.com/micro-ROS/micro-ROS-Agent/issues/147>`_)
3.0.2 (2022-05-25)
------------------
3.0.1 (2022-03-25)
+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
ros2
v2.4.2
PREFIX
${PROJECT_BINARY_DIR}/agent
INSTALL_DIR
@@ -65,6 +65,7 @@
#include <string>
#include <memory>
#include <map>
#include <thread>
namespace uros {
namespace agent {
@@ -111,6 +112,12 @@ 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.
@@ -299,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_;
};
+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>4.0.0</version>
<version>3.0.6</version>
<description>micro-ROS Agent package</description>
<maintainer email="pablogarrido@eprosima.com">Pablo Garrido</maintainer>
<maintainer email="antoniocuadros@eprosima.com">Antonio Cuadros</maintainer>
<maintainer email="eugeniocollado@eprosima.com">Eugenio Collado</maintainer>
<maintainer email="davidlaseca@eprosima.com">David Laseca</maintainer>
<license>Apache License 2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
@@ -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(
@@ -597,7 +599,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)
@@ -614,13 +616,15 @@ void GraphManager::ParticipantListener::on_participant_discovery(
const std::string enclave =
std::string(name_found->second.begin(), name_found->second.end());
graphManager_from_->add_participant(participant, false, enclave);
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);
break;
}
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT:
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DROPPED_PARTICIPANT:
{
graphManager_from_->remove_participant(participant, false);
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);
break;
}
default:
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles" >
<transport_descriptors>
<transport_descriptor>
<transport_id>CustomUdpTransport</transport_id>
<type>UDPv4</type>
</transport_descriptor>
</transport_descriptors>
<participant profile_name="participant_profile" is_default_profile="true">
<rtps>
<userTransports>
<transport_id>CustomUdpTransport</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
</rtps>
</participant>
</profiles>
+1 -1
View File
@@ -24,4 +24,4 @@ if [ -n "$p2p_port" ]; then
set -- --p2p "$p2p_port" "$@"
fi
exec "$SNAP/lib/micro_ros_agent/micro_ros_agent" "$transport" "$@"
exec "$SNAP/opt/ros/snap/lib/micro_ros_agent/micro_ros_agent" "$transport" "$@"
+35 -35
View File
@@ -71,16 +71,6 @@ description: |
$ snap set micro-ros-agent device="device path"
If connecting the micro-ROS Agent using an IP based connection mode,
that is, `udp4`, `udp6`, `tcp4` or `tcp6`, care must be taken to
connect first the `micro-ros-agent-shm-netplug` plug.
This is due to the fact that ROS 2 Foxy is using Fast-DDS as the
default DDS middleware, and Fast-DDS comes with *shared memory transport*.
Thus, this plugin must be enabled, in order to gain access to the
`/dev/shm` folder from the snap image, prior to running it:
$ sudo snap connect micro-ros-agent:micro-ros-agent-shm-netplug
When using the snap with a serial device, some steps need to be taken
in order to establish a successful connection:
@@ -120,49 +110,59 @@ architectures:
- build-on: armhf
- build-on: ppc64el
package-repositories:
- components: [main]
formats: [deb]
key-id: C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
key-server: keyserver.ubuntu.com
suites: [focal]
type: apt
url: http://repo.ros2.org/ubuntu/main
parts:
ros2-foxy-extension:
build-packages: [ros-foxy-ros-core]
override-build: install -D -m 0755 launch ${SNAPCRAFT_PART_INSTALL}/snap/command-chain/ros2-launch
plugin: nil
source: $SNAPCRAFT_EXTENSIONS_DIR/ros2
uros-agent:
plugin: colcon
source: .
override-build: |
set +u
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git -b $ROS_DISTRO
git clone https://github.com/eProsima/Micro-CDR.git -b $ROS_DISTRO
git clone https://github.com/micro-ROS/micro_ros_msgs.git -b $ROS_DISTRO
git clone https://github.com/micro-ROS/rosidl_typesupport_microxrcedds.git -b $ROS_DISTRO
git clone https://github.com/micro-ROS/rmw-microxrcedds.git -b $ROS_DISTRO
git clone https://github.com/micro-ROS/micro-ROS-Agent.git -b $ROS_DISTRO
. /opt/ros/$ROS_DISTRO/setup.sh
colcon build --merge-install --install-base $SNAPCRAFT_PRIME --cmake-args "-DUAGENT_BUILD_EXECUTABLE=OFF -DUAGENT_USE_SYSTEM_FASTDDS=ON" --packages-up-to micro_ros_agent
set -u
colcon-cmake-args:
- -DMICROROSAGENT_SUPERBUILD=ON
- --cmake-force-configure
override-pull: |
snapcraftctl pull
version="$(git describe --always --tags| sed -e 's/^v//;s/-/+git/;y/-/./')"
[ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable
snapcraftctl set-version "$version"
snapcraftctl set-grade "$grade"
build-packages: [make, gcc, g++]
stage-packages: [ros-foxy-ros2launch]
build-environment:
- ROS_VERSION: '2'
- ROS_DISTRO: foxy
runner:
plugin: dump
source: snap/local/
organize:
'*': usr/bin/
plugs:
micro-ros-agent-shm-netplug:
interface: system-files
allow-auto-connection: true
write:
- /dev/shm
'micro-ros-agent-daemon': usr/bin/
'fastdds_no_shared_memory.xml': usr/share/
apps:
micro-ros-agent:
command: lib/micro_ros_agent/micro_ros_agent
command: opt/ros/snap/lib/micro_ros_agent/micro_ros_agent
environment:
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/lib"
plugs: [network, network-bind, serial-port, micro-ros-agent-shm-netplug]
extensions: [ros2-foxy]
FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
plugs: [network, network-bind, serial-port]
daemon:
command: usr/bin/micro-ros-agent-daemon
environment:
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/lib"
FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
daemon: simple
plugs: [network, network-bind, serial-port, micro-ros-agent-shm-netplug]
plugs: [network, network-bind, serial-port]