Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colcon build & running perf_test with -DPERFORMANCE_TEST_CYCLONEDDS_ENABLED=ON fails #26

Open
y-okumura-isp opened this issue Dec 10, 2020 · 0 comments

Comments

@y-okumura-isp
Copy link

I'm working on CycloneDDS Relay mode(ros2/buildfarm_perf_tests#92), and faced this issues.

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • rolling(build)
  • Version or commit hash:

Steps to reproduce issue

Before building performance_test, we need CycloneDDS idlc. Thus, we have to build ROS2 after sudo apt install maven default-jdk.

Additionally, find_package(CycloneDDS COMPONENTS idlc) looks missing in performance_test/CMakeLists.txt.
I change this file as following.

# CycloneDDS
option(PERFORMANCE_TEST_CYCLONEDDS_ENABLED "Enable CycloneDDS" OFF)
if(PERFORMANCE_TEST_CYCLONEDDS_ENABLED)
  find_package(CycloneDDS REQUIRED)
  find_package(CycloneDDS COMPONENTS idlc)   # add this line
  add_definitions(-DPERFORMANCE_TEST_CYCLONEDDS_ENABLED)
  add_subdirectory(src/idlgen/cyclonedds)
  include_directories(${CYCLONEDDS_IDL_INCLUDE_DIR})
endif()

Then when I run colcon build, I got following error. But sometimes I could build successfully.
When build succeeds, static library build/performance_test/src/idlgen/cyclonedds/objs/libcyclonedds_idl.a was created.
When fail, dynamic library build/performance_test/src/idlgen/cyclonedds/objs/libcyclonedds_idl.so was created.
Undefined functions reported below are in this library.

$ colcon build --symlink-install --cmake-args -DPERFORMANCE_TEST_CYCLONEDDS_ENABLED=ON
--- stderr: performance_test                                                                                                                                                                                                         
/usr/bin/ld: CMakeFiles/perf_test.dir/src/data_running/data_runner_factory.cpp.o: in function `performance_test::topics::Array1k::CycloneDDSDesc()':                                                                                 
data_runner_factory.cpp:(.text._ZN16performance_test6topics7Array1k14CycloneDDSDescEv[_ZN16performance_test6topics7Array1k14CycloneDDSDescEv]+0xb): undefined reference to `performance_test_msgs_msg_dds__Array1k__desc'            
/usr/bin/ld: CMakeFiles/perf_test.dir/src/data_running/data_runner_factory.cpp.o: in function `performance_test::topics::Array4k::CycloneDDSDesc()':                                                                                 
data_runner_factory.cpp:(.text._ZN16performance_test6topics7Array4k14CycloneDDSDescEv[_ZN16performance_test6topics7Array4k14CycloneDDSDescEv]+0xb): undefined reference to `performance_test_msgs_msg_dds__Array4k__desc'
/usr/bin/ld: CMakeFiles/perf_test.dir/src/data_running/data_runner_factory.cpp.o: in function `performance_test::topics::Array16k::CycloneDDSDesc()':
(snip)
---                                                                                                                                                                                                                                  
Failed   <<< performance_test [19.2s, exited with code 2] 

In my environment, I can successfully build by changing performance_test/src/idlgen/cyclonedds/CMakeLists.txt.

add_library(cyclonedds_idl ${IDL_GEN_H_LIST} ${IDL_GEN_C_LIST})
->
add_library(cyclonedds_idl STATIC ${IDL_GEN_H_LIST} ${IDL_GEN_C_LIST})

But perf_test abort.

$ ./build-cyclone/performance_test/perf_test -c CycloneDDS -t Array1k
Experiment id: fd1d025c-8a93-4ab9-9422-c9551c939cee
Performance Test Version: 57791ae-dirty
Logfile name: 
Communication mean: CYCLONEDDS
RMW Implementation: rmw_fastrtps_cpp
DDS domain id: 0
QOS: Reliability: BEST_EFFORT Durability: VOLATILE History kind: KEEP_ALL History depth: 1000 Sync. pub/sub: 0
Publishing rate: 1000
Topic name: Array1k
Maximum runtime (sec): 0
Number of publishers: 1
Number of subscribers: 1
Memory check enabled: 0
Use single participant: 0
With security: 0
Roundtrip Mode: NONE
Ignore seconds from beginning: 0

---EXPERIMENT-START---
T_experiment,   T_loop, received,       sent,   lost,   relative_loss,  data_received,  latency_min (ms),       latency_max (ms),       latency_mean (ms),      latency_variance (ms),  pub_loop_res_min (ms),  pub_loop_res_max (ms),       pub_loop_res_mean (ms), pub_loop_res_variance (ms),     sub_loop_res_min (ms),  sub_loop_res_max (ms),  sub_loop_res_mean (ms), sub_loop_res_variance (ms),     ru_utime,       ru_stime,       ru_maxrss,      ru_ixrss,   ru_idrss,        ru_isrss,       ru_minflt,      ru_majflt,      ru_nswap,       ru_inblock,     ru_oublock,     ru_msgsnd,      ru_msgrcv,      ru_nsignals,    ru_nvcsw,       ru_nivcsw,      cpu_usage (%),
terminate called after throwing an instance of 'std::runtime_error'
  what():  failed to create datareader

I think I coud fix it when I wrote CycloneDDS Relay mode.
I wonder where is the right repository(here? Apex repository?), but I already worked on this repository.
So I'm goning to send PR for now after this.

Expected behavior

build succeeds.

Actual behavior

build failed.

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant