Skip to content

Commit ea635b7

Browse files
authored
Add Binary participant name (#134)
* Initial * Add Binary participant name * Update .github/workflows/ci.yml
1 parent 22ed452 commit ea635b7

3 files changed

Lines changed: 12 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ on:
66
- foxy
77
- main
88
pull_request:
9-
branches:
9+
branches:
1010
- '**'
1111

1212
jobs:
1313
rmw_microxrcedds_ci:
1414
runs-on: ubuntu-20.04
1515
container: microros/micro-ros-agent:foxy
16-
16+
1717
steps:
1818
- uses: actions/checkout@v2
1919
with:
2020
path: src/rmw-microxrcedds
2121

2222
- name: Download dependencies
2323
run: |
24-
git clone -b foxy https://github.com/eProsima/Micro-CDR src/Micro-CDR
25-
git clone -b foxy https://github.com/eProsima/Micro-XRCE-DDS-Client src/Micro-XRCE-DDS-Client
24+
git clone -b foxy https://github.com/eProsima/Micro-CDR src/Micro-CDR
25+
git clone -b foxy https://github.com/eProsima/Micro-XRCE-DDS-Client src/Micro-XRCE-DDS-Client
2626
git clone -b foxy https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds
2727
touch src/rosidl_typesupport_microxrcedds/test/COLCON_IGNORE
2828
# Install coverage tools
@@ -33,15 +33,15 @@ jobs:
3333
run: . /opt/ros/foxy/setup.sh && colcon build --symlink-install --cmake-args -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="-ftest-coverage --coverage -fno-inline -fno-inline-small-functions -fno-default-inline" -DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON -DCMAKE_C_FLAGS="-ftest-coverage --coverage -fno-inline -fno-inline-small-functions -fno-default-inline" -DCMAKE_C_OUTPUT_EXTENSION_REPLACE=ON
3434

3535
- name: Test
36-
run: |
36+
run: |
3737
. /opt/ros/foxy/setup.sh && . /uros_ws/install/local_setup.sh && ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888 -d -v6 &
38-
sleep 1
39-
. /opt/ros/foxy/setup.sh && . install/local_setup.sh
38+
sleep 1
39+
. /opt/ros/foxy/setup.sh && . install/local_setup.sh
4040
colcon test --packages-select=rmw_microxrcedds --return-code-on-test-failure --ctest-args -E "(cpplint)|(lint_cmake)|(uncrustify)|(xmllint)"
4141
./build/rmw_microxrcedds/test/test-sizes 2> memanalisys_out
4242
4343
- name: Uncrustify
44-
run: |
44+
run: |
4545
# Install Uncrustify
4646
git clone https://github.com/uncrustify/uncrustify.git --branch uncrustify-0.72.0 --single-branch uncrustify
4747
mkdir -p uncrustify/build
@@ -54,10 +54,10 @@ jobs:
5454
cd src/rmw-microxrcedds/rmw_microxrcedds_c
5555
curl -l https://raw.githubusercontent.com/eProsima/cpp-style/master/uncrustify.cfg -o uncrustify.cfg
5656
find src test include \( -name "*.cpp" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" \) -exec uncrustify -c uncrustify.cfg --check {} +
57-
57+
5858
- name: Static memory
5959
continue-on-error: true
60-
if: github.event_name == 'pull_request'
60+
if: github.event_name == 'pull_request'
6161
uses: machine-learning-apps/pr-comment@master
6262
env:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

rmw_microxrcedds_c/src/rmw_graph.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,12 @@ rmw_ret_t rmw_graph_init(
4444
size_t microros_domain_id = 0; // TODO(jamoralp): shall this Domain ID be configurabe, user wise?
4545
const char* graph_participant_name = "microros_graph";
4646

47-
if (!build_participant_xml(microros_domain_id, graph_participant_name,
48-
rmw_uxrce_entity_naming_buffer, sizeof(rmw_uxrce_entity_naming_buffer)))
49-
{
50-
RMW_SET_ERROR_MSG("Failed to generate xml request for graph participant creation");
51-
return RMW_RET_ERROR;
52-
}
53-
5447
uint16_t participant_req = uxr_buffer_create_participant_bin(
5548
&context->session,
5649
*context->creation_destroy_stream,
5750
graph_info->participant_id,
5851
(int16_t)microros_domain_id,
52+
graph_participant_name,
5953
UXR_REPLACE);
6054

6155
// Set graph subscription QoS policies

rmw_microxrcedds_c/src/rmw_node.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ rmw_node_t* create_node(
102102
*node_info->context->creation_destroy_stream,
103103
node_info->participant_id,
104104
domain_id,
105+
name,
105106
UXR_REPLACE);
106107
#endif /* ifdef RMW_UXRCE_USE_REFS */
107108

0 commit comments

Comments
 (0)