mirror of
https://github.com/micro-ROS/micro-ROS-Agent.git
synced 2026-09-06 18:05:17 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
904d890366 | ||
|
|
5edc16903c | ||
|
|
dc4a428a75 | ||
|
|
7f0af6b953 | ||
|
|
7372bbe5bd | ||
|
|
a88be1bbbb | ||
|
|
92b7343d1a | ||
|
|
e6b928b1e1 | ||
|
|
4c98e4f9f5 | ||
|
|
964b0aec1a | ||
|
|
03946126dd | ||
|
|
0142528a73 | ||
|
|
53ff7d409d | ||
|
|
9e9167b0d7 | ||
|
|
93aa9e6a73 | ||
|
|
e62154a1cf | ||
|
|
495733690c | ||
|
|
179ae80b94 | ||
|
|
5ad09cec70 | ||
|
|
dfd6966cd1 |
+10
-10
@@ -3,27 +3,27 @@ name: CI micro-ROS Agent
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'humble'
|
- 'rolling'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '33 6 * * *'
|
- cron: '33 6 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
microros_agent_ci:
|
microros_agent_ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-20.04 ]
|
os: [ ubuntu-latest ]
|
||||||
ros_distribution: [ humble ]
|
ros_distribution: [ rolling ]
|
||||||
include:
|
include:
|
||||||
- docker_image: ubuntu:jammy
|
- docker_image: ubuntu:24.04
|
||||||
ros_distribution: humble
|
ros_distribution: rolling
|
||||||
container:
|
container:
|
||||||
image: ubuntu:jammy
|
image: ${{ matrix.docker_image }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: ros-tooling/setup-ros@0.3.2
|
- uses: ros-tooling/setup-ros@0.7.7
|
||||||
with:
|
with:
|
||||||
use-ros2-testing: false
|
use-ros2-testing: false
|
||||||
required-ros-distributions: ${{ matrix.ros_distribution }}
|
required-ros-distributions: ${{ matrix.ros_distribution }}
|
||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt-get install ros-${{ matrix.ros_distribution }}-micro-ros-msgs
|
apt-get install ros-${{ matrix.ros_distribution }}-micro-ros-msgs
|
||||||
apt-get install ros-${{ matrix.ros_distribution }}-rmw-fastrtps-cpp
|
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:
|
with:
|
||||||
package-name: "micro_ros_agent"
|
package-name: "micro_ros_agent"
|
||||||
target-ros2-distro: ${{ matrix.ros_distribution }}
|
target-ros2-distro: ${{ matrix.ros_distribution }}
|
||||||
|
|||||||
@@ -2,16 +2,29 @@
|
|||||||
Changelog for package micro-ros_agent
|
Changelog for package micro-ros_agent
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
3.0.4 (2022-09-28)
|
6.0.0 (2024-05-31)
|
||||||
------------------
|
------------------
|
||||||
* Fix Datawriter destruction (`#169 <https://github.com/micro-ROS/micro-ROS-Agent/issues/169>`_)
|
* Bump Micro XRCE-DDS Agent (`#226 <https://github.com/micro-ROS/micro-ROS-Agent/issues/226>`_)
|
||||||
* Synchronise predicate (`#160 <https://github.com/micro-ROS/micro-ROS-Agent/issues/160>`_)
|
|
||||||
|
|
||||||
3.0.3 (2022-06-13)
|
5.0.1 (2024-01-29)
|
||||||
------------------
|
------------------
|
||||||
* Fix memory leak in graph manager (`#147 <https://github.com/micro-ROS/micro-ROS-Agent/issues/147>`_)
|
* 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>`_)
|
||||||
|
|
||||||
3.0.2 (2022-05-25)
|
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.1 (2022-03-25)
|
3.0.1 (2022-03-25)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ if(NOT xrceagent_FOUND)
|
|||||||
GIT_REPOSITORY
|
GIT_REPOSITORY
|
||||||
https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||||
GIT_TAG
|
GIT_TAG
|
||||||
ros2
|
v2.4.3
|
||||||
PREFIX
|
PREFIX
|
||||||
${PROJECT_BINARY_DIR}/agent
|
${PROJECT_BINARY_DIR}/agent
|
||||||
INSTALL_DIR
|
INSTALL_DIR
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
namespace uros {
|
namespace uros {
|
||||||
namespace agent {
|
namespace agent {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||||
<package format="3">
|
<package format="3">
|
||||||
<name>micro_ros_agent</name>
|
<name>micro_ros_agent</name>
|
||||||
<version>3.0.4</version>
|
<version>6.0.0</version>
|
||||||
<description>micro-ROS Agent package</description>
|
<description>micro-ROS Agent package</description>
|
||||||
<maintainer email="pablogarrido@eprosima.com">Pablo Garrido</maintainer>
|
<maintainer email="pablogarrido@eprosima.com">Pablo Garrido</maintainer>
|
||||||
<maintainer email="antoniocuadros@eprosima.com">Antonio Cuadros</maintainer>
|
<maintainer email="antoniocuadros@eprosima.com">Antonio Cuadros</maintainer>
|
||||||
|
|||||||
@@ -374,8 +374,8 @@ void GraphManager::add_datawriter(
|
|||||||
"rmw_fastrtps_cpp", participant_guid);
|
"rmw_fastrtps_cpp", participant_guid);
|
||||||
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(writer_qos);
|
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(writer_qos);
|
||||||
|
|
||||||
graphCache_.add_entity(datawriter_gid, topic_name,
|
graphCache_.add_entity(datawriter_gid, topic_name, type_name,
|
||||||
type_name, participant_gid, qos_profile, false);
|
rosidl_get_zero_initialized_type_hash(), participant_gid, qos_profile, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphManager::remove_datawriter(
|
void GraphManager::remove_datawriter(
|
||||||
@@ -411,8 +411,13 @@ void GraphManager::add_datareader(
|
|||||||
"rmw_fastrtps_cpp", participant_guid);
|
"rmw_fastrtps_cpp", participant_guid);
|
||||||
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(reader_qos);
|
const rmw_qos_profile_t qos_profile = fastdds_qos_to_rmw_qos(reader_qos);
|
||||||
|
|
||||||
graphCache_.add_entity(datareader_gid, topic_name,
|
// TODO(acuadros95): Use typesupport to calculate type hash on micro-ROS and save and get it from reader_qos.user_data.
|
||||||
type_name, participant_gid, qos_profile, true);
|
// 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(
|
void GraphManager::remove_datareader(
|
||||||
|
|||||||
@@ -54,14 +54,14 @@ bool ParticipantEntitiesInfoTypeSupport::serialize(
|
|||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
||||||
payload->max_size);
|
payload->max_size);
|
||||||
eprosima::fastcdr::Cdr scdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
eprosima::fastcdr::Cdr scdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
||||||
eprosima::fastcdr::Cdr::DDS_CDR);
|
eprosima::fastcdr::DDS_CDR);
|
||||||
|
|
||||||
scdr.serialize_encapsulation();
|
scdr.serialize_encapsulation();
|
||||||
if (callbacks_->cdr_serialize(data, scdr))
|
if (callbacks_->cdr_serialize(data, scdr))
|
||||||
{
|
{
|
||||||
payload->encapsulation = (scdr.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS) ?
|
payload->encapsulation = (scdr.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS) ?
|
||||||
CDR_BE : CDR_LE;
|
CDR_BE : CDR_LE;
|
||||||
payload->length = static_cast<uint32_t>(scdr.getSerializedDataLength());
|
payload->length = static_cast<uint32_t>(scdr.get_serialized_data_length());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -77,7 +77,7 @@ bool ParticipantEntitiesInfoTypeSupport::deserialize(
|
|||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
||||||
payload->length);
|
payload->length);
|
||||||
eprosima::fastcdr::Cdr dcdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
eprosima::fastcdr::Cdr dcdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
||||||
eprosima::fastcdr::Cdr::DDS_CDR);
|
eprosima::fastcdr::DDS_CDR);
|
||||||
|
|
||||||
dcdr.read_encapsulation();
|
dcdr.read_encapsulation();
|
||||||
return callbacks_->cdr_deserialize(dcdr, data);
|
return callbacks_->cdr_deserialize(dcdr, data);
|
||||||
@@ -146,14 +146,14 @@ bool MicrorosGraphInfoTypeSupport::serialize(
|
|||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
||||||
payload->max_size);
|
payload->max_size);
|
||||||
eprosima::fastcdr::Cdr scdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
eprosima::fastcdr::Cdr scdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
||||||
eprosima::fastcdr::Cdr::DDS_CDR);
|
eprosima::fastcdr::DDS_CDR);
|
||||||
|
|
||||||
scdr.serialize_encapsulation();
|
scdr.serialize_encapsulation();
|
||||||
if (callbacks_->cdr_serialize(data, scdr))
|
if (callbacks_->cdr_serialize(data, scdr))
|
||||||
{
|
{
|
||||||
payload->encapsulation = (scdr.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS) ?
|
payload->encapsulation = (scdr.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS) ?
|
||||||
CDR_BE : CDR_LE;
|
CDR_BE : CDR_LE;
|
||||||
payload->length = static_cast<uint32_t>(scdr.getSerializedDataLength());
|
payload->length = static_cast<uint32_t>(scdr.get_serialized_data_length());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -169,7 +169,7 @@ bool MicrorosGraphInfoTypeSupport::deserialize(
|
|||||||
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char *>(payload->data),
|
||||||
payload->length);
|
payload->length);
|
||||||
eprosima::fastcdr::Cdr dcdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
eprosima::fastcdr::Cdr dcdr(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
|
||||||
eprosima::fastcdr::Cdr::DDS_CDR);
|
eprosima::fastcdr::DDS_CDR);
|
||||||
|
|
||||||
dcdr.read_encapsulation();
|
dcdr.read_encapsulation();
|
||||||
return callbacks_->cdr_deserialize(dcdr, data);
|
return callbacks_->cdr_deserialize(dcdr, data);
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -24,4 +24,4 @@ if [ -n "$p2p_port" ]; then
|
|||||||
set -- --p2p "$p2p_port" "$@"
|
set -- --p2p "$p2p_port" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$SNAP/opt/ros/snap/lib/micro_ros_agent/micro_ros_agent" "$transport" "$@"
|
exec "$SNAP/lib/micro_ros_agent/micro_ros_agent" "$transport" "$@"
|
||||||
|
|||||||
+35
-35
@@ -71,6 +71,16 @@ description: |
|
|||||||
|
|
||||||
$ snap set micro-ros-agent device="device path"
|
$ 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
|
When using the snap with a serial device, some steps need to be taken
|
||||||
in order to establish a successful connection:
|
in order to establish a successful connection:
|
||||||
|
|
||||||
@@ -110,59 +120,49 @@ architectures:
|
|||||||
- build-on: armhf
|
- build-on: armhf
|
||||||
- build-on: ppc64el
|
- 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:
|
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:
|
uros-agent:
|
||||||
plugin: colcon
|
plugin: colcon
|
||||||
source: .
|
source: .
|
||||||
colcon-cmake-args:
|
override-build: |
|
||||||
- -DMICROROSAGENT_SUPERBUILD=ON
|
set +u
|
||||||
- --cmake-force-configure
|
git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git -b $ROS_DISTRO
|
||||||
override-pull: |
|
git clone https://github.com/eProsima/Micro-CDR.git -b $ROS_DISTRO
|
||||||
snapcraftctl pull
|
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
|
||||||
version="$(git describe --always --tags| sed -e 's/^v//;s/-/+git/;y/-/./')"
|
git clone https://github.com/micro-ROS/rmw-microxrcedds.git -b $ROS_DISTRO
|
||||||
[ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable
|
git clone https://github.com/micro-ROS/micro-ROS-Agent.git -b $ROS_DISTRO
|
||||||
snapcraftctl set-version "$version"
|
. /opt/ros/$ROS_DISTRO/setup.sh
|
||||||
snapcraftctl set-grade "$grade"
|
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
|
||||||
build-packages: [make, gcc, g++]
|
build-packages: [make, gcc, g++]
|
||||||
stage-packages: [ros-foxy-ros2launch]
|
stage-packages: [ros-foxy-ros2launch]
|
||||||
build-environment:
|
|
||||||
- ROS_VERSION: '2'
|
|
||||||
- ROS_DISTRO: foxy
|
|
||||||
|
|
||||||
runner:
|
runner:
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: snap/local/
|
source: snap/local/
|
||||||
organize:
|
organize:
|
||||||
'micro-ros-agent-daemon': usr/bin/
|
'*': usr/bin/
|
||||||
'fastdds_no_shared_memory.xml': usr/share/
|
|
||||||
|
plugs:
|
||||||
|
micro-ros-agent-shm-netplug:
|
||||||
|
interface: system-files
|
||||||
|
allow-auto-connection: true
|
||||||
|
write:
|
||||||
|
- /dev/shm
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
micro-ros-agent:
|
micro-ros-agent:
|
||||||
command: opt/ros/snap/lib/micro_ros_agent/micro_ros_agent
|
command: lib/micro_ros_agent/micro_ros_agent
|
||||||
environment:
|
environment:
|
||||||
FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
|
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/lib"
|
||||||
plugs: [network, network-bind, serial-port]
|
plugs: [network, network-bind, serial-port, micro-ros-agent-shm-netplug]
|
||||||
|
extensions: [ros2-foxy]
|
||||||
|
|
||||||
daemon:
|
daemon:
|
||||||
command: usr/bin/micro-ros-agent-daemon
|
command: usr/bin/micro-ros-agent-daemon
|
||||||
environment:
|
environment:
|
||||||
FASTRTPS_DEFAULT_PROFILES_FILE: ${SNAP}/usr/share/fastdds_no_shared_memory.xml
|
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/lib"
|
||||||
daemon: simple
|
daemon: simple
|
||||||
plugs: [network, network-bind, serial-port]
|
plugs: [network, network-bind, serial-port, micro-ros-agent-shm-netplug]
|
||||||
|
|||||||
Reference in New Issue
Block a user