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

How to establish communication between ros2 and apollo cyberrt? #15502

Open
Liyuanliu0011 opened this issue Aug 14, 2024 · 2 comments
Open

How to establish communication between ros2 and apollo cyberrt? #15502

Liyuanliu0011 opened this issue Aug 14, 2024 · 2 comments

Comments

@Liyuanliu0011
Copy link

Liyuanliu0011 commented Aug 14, 2024

There is a project, the application module is using ros2, want to establish communication with cyber rt, I made a bridge, hoping to connect. However, the versions of fastrtps were inconsistent, causing the bridge to compile incorrectly. I would like to ask how to solve this problem, or can you provide some ideas? Looking forward to your reply.


有一个项目,应用模块是使用了ros2,想和cyber rt建立通讯,自己做了一个bridge希望能连接起来。但是fastrtps的版本不一致导致bridge编译报错了。我想请问如何能够解决这个问题,或者能否提供一些思路? 期待各位的回复。

@daohu527
Copy link
Contributor

We are upgrading the version of fastrtps. Can you describe your problem in detail? Will your bridge rely on both cyber and ros2?

@Liyuanliu0011
Copy link
Author

Liyuanliu0011 commented Aug 19, 2024

We are upgrading the version of fastrtps. Can you describe your problem in detail? Will your bridge rely on both cyber and ros2?

yes, both cyber and ros2 in my main.cc

GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.2) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./user_navigation...
(gdb) r
Starting program: *******user_navigation**** 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
WARNING: Logging before InitGoogleLogging() is written to STDERR
E0819 15:53:21.755729 77811 param_utils.h:47] param file hadn't been loaded!!!
[New Thread 0x7ffff41fc700 (LWP 77815)]
I0819 15:53:21.756786 77811 global_data.cc:134] [user_navigation]CYBER_IP is loopback: 127.0.0.1
W0819 15:53:21.756837 77811 global_data.cc:153] [user_navigation]No match found for default IP sets: {0: 192.168.1.}; {1: 10.0.0.}; 
I0819 15:53:21.756841 77811 global_data.cc:157] [user_navigation]ipv4 addr 0: 127.0.0.1
I0819 15:53:21.756845 77811 global_data.cc:157] [user_navigation]ipv4 addr 1: 172.17.92.131
W0819 15:53:21.756847 77811 global_data.cc:159] [user_navigation]No match found for all given IP, we will use host ip: 127.0.0.1
[New Thread 0x7ffff39fb700 (LWP 77816)]
I0819 15:53:21.760066 77816 processor.cc:42] [user_navigation]processor_tid: 77816
[New Thread 0x7ffff31fa700 (LWP 77817)]
I0819 15:53:21.760458 77817 processor.cc:42] [user_navigation]processor_tid: 77817
[New Thread 0x7ffff29f9700 (LWP 77818)]
I0819 15:53:21.760799 77818 processor.cc:42] [user_navigation]processor_tid: 77818
[New Thread 0x7ffff21f8700 (LWP 77819)]
I0819 15:53:21.761106 77819 processor.cc:42] [user_navigation]processor_tid: 77819
[New Thread 0x7ffff19f7700 (LWP 77820)]
I0819 15:53:21.761381 77820 processor.cc:42] [user_navigation]processor_tid: 77820
[New Thread 0x7ffff11f6700 (LWP 77821)]
I0819 15:53:21.761536 77821 processor.cc:42] [user_navigation]processor_tid: 77821
[New Thread 0x7ffff09f5700 (LWP 77822)]
I0819 15:53:21.761809 77822 processor.cc:42] [user_navigation]processor_tid: 77822
[New Thread 0x7fffd3fff700 (LWP 77823)]
I0819 15:53:21.762060 77823 processor.cc:42] [user_navigation]processor_tid: 77823
[New Thread 0x7fffd37fe700 (LWP 77824)]
I0819 15:53:21.762267 77824 processor.cc:42] [user_navigation]processor_tid: 77824
[New Thread 0x7fffd2ffd700 (LWP 77825)]
I0819 15:53:21.762475 77825 processor.cc:42] [user_navigation]processor_tid: 77825
[New Thread 0x7fffd27fc700 (LWP 77826)]
I0819 15:53:21.762620 77826 processor.cc:42] [user_navigation]processor_tid: 77826
[New Thread 0x7fffd1ffb700 (LWP 77827)]
I0819 15:53:21.762769 77827 processor.cc:42] [user_navigation]processor_tid: 77827
[New Thread 0x7fffd17fa700 (LWP 77828)]
I0819 15:53:21.762926 77828 processor.cc:42] [user_navigation]processor_tid: 77828
[New Thread 0x7fffd0ff9700 (LWP 77829)]
I0819 15:53:21.763124 77829 processor.cc:42] [user_navigation]processor_tid: 77829
[New Thread 0x7fffb3fff700 (LWP 77830)]
I0819 15:53:21.763172 77830 processor.cc:42] [user_navigation]processor_tid: 77830
[New Thread 0x7fffb37fe700 (LWP 77831)]
I0819 15:53:21.763238 77831 processor.cc:42] [user_navigation]processor_tid: 77831
I0819 15:53:21.763274 77811 init.cc:113] [user_navigation]Register exit handle succ.
[New Thread 0x7fffb2ffd700 (LWP 77832)]
[New Thread 0x7fffb27fc700 (LWP 77833)]
[New Thread 0x7fffb1ffb700 (LWP 77834)]
[New Thread 0x7fffb17fa700 (LWP 77835)]
[New Thread 0x7fffb0ff9700 (LWP 77836)]
[New Thread 0x7fff9bfff700 (LWP 77837)]
[New Thread 0x7fff9af74700 (LWP 77838)]
E0819 15:53:21.833146 77811 param_utils.h:47] param file hadn't been loaded!!!
[New Thread 0x7fff9a773700 (LWP 77839)]
[New Thread 0x7fff99f72700 (LWP 77840)]
[New Thread 0x7fff99771700 (LWP 77841)]
2024-08-19 15:53:21.835 [RTPS_PARTICIPANT Error] Cannot create participant, because there is any transport -> Function createParticipant

Thread 1 "cyber_navi" received signal SIGSEGV, Segmentation fault.
eprosima::fastrtps::rtps::RTPSParticipantImpl::~RTPSParticipantImpl (this=0x555555da0690, __in_chrg=<optimized out>) at /apollo/docker/build/installers/Fast-RTPS/src/cpp/rtps/participant/RTPSParticipantImpl.cpp:359
359	/apollo/docker/build/installers/Fast-RTPS/src/cpp/rtps/participant/RTPSParticipantImpl.cpp: 没有那个文件或目录.
(gdb) bt
#0  eprosima::fastrtps::rtps::RTPSParticipantImpl::~RTPSParticipantImpl (this=0x555555da0690, __in_chrg=<optimized out>) at /apollo/docker/build/installers/Fast-RTPS/src/cpp/rtps/participant/RTPSParticipantImpl.cpp:359
#1  0x00007ffff481cd49 in eprosima::fastrtps::rtps::RTPSParticipantImpl::~RTPSParticipantImpl (this=0x555555da0690, __in_chrg=<optimized out>) at /apollo/docker/build/installers/Fast-RTPS/src/cpp/rtps/participant/RTPSParticipantImpl.cpp:387
#2  0x00007fff9b28cdcb in eprosima::fastrtps::rtps::RTPSDomain::createParticipant(unsigned int, bool, eprosima::fastrtps::rtps::RTPSParticipantAttributes const&, eprosima::fastrtps::rtps::RTPSParticipantListener*) () from /opt/ros/foxy/lib/libfastrtps.so.2
#3  0x00007fff9b291030 in eprosima::fastrtps::Domain::createParticipant(eprosima::fastrtps::ParticipantAttributes const&, eprosima::fastrtps::ParticipantListener*) () from /opt/ros/foxy/lib/libfastrtps.so.2
#4  0x00007ffff01c5b22 in rmw_fastrtps_shared_cpp::create_participant(char const*, unsigned long, rmw_security_options_t const*, bool, char const*, rmw_dds_common::Context*) () from /opt/ros/foxy/lib/librmw_fastrtps_shared_cpp.so
#5  0x00007ffff5ef3edd in ?? () from /opt/ros/foxy/lib/librmw_fastrtps_cpp.so
#6  0x00007ffff5ef46a0 in ?? () from /opt/ros/foxy/lib/librmw_fastrtps_cpp.so
#7  0x00007ffff5efe8cc in rmw_create_node () from /opt/ros/foxy/lib/librmw_fastrtps_cpp.so
#8  0x00007ffff4cd09d8 in rcl_node_init () from /opt/ros/foxy/lib/librcl.so
#9  0x00007ffff603d618 in rclcpp::node_interfaces::NodeBase::NodeBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<rclcpp::Context>, rcl_node_options_t const&, bool, bool) () from /opt/ros/foxy/lib/librclcpp.so
#10 0x00007ffff6036dbe in rclcpp::Node::Node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::NodeOptions const&) () from /opt/ros/foxy/lib/librclcpp.so
#11 0x00007ffff60383d8 in rclcpp::Node::Node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::NodeOptions const&) () from /opt/ros/foxy/lib/librclcpp.so
#12 0x000055555555c155 in __gnu_cxx::new_allocator<rclcpp::Node>::construct<rclcpp::Node, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (__p=0x555555d9f330, this=<optimized out>) at /usr/include/c++/9/new:174
#13 0x0000555555560160 in std::allocator_traits<std::allocator<rclcpp::Node> >::construct<rclcpp::Node, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (__a=..., __p=0x555555d9f330) at /usr/include/c++/9/bits/alloc_traits.h:481
#14 std::_Sp_counted_ptr_inplace<rclcpp::Node, std::allocator<rclcpp::Node>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (__a=..., this=0x555555d9f320) at /usr/include/c++/9/bits/shared_ptr_base.h:548
#15 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<rclcpp::Node, std::allocator<rclcpp::Node>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (__a=..., __p=@0x7fffffffcc30: 0x0, this=0x7fffffffcc38) at /usr/include/c++/9/bits/shared_ptr_base.h:679
#16 std::__shared_ptr<rclcpp::Node, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<rclcpp::Node>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (this=0x7fffffffcc30, __tag=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1344
#17 0x000055555555b0eb in std::shared_ptr<rclcpp::Node>::shared_ptr<std::allocator<rclcpp::Node>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (__tag=..., this=0x7fffffffcc30) at /usr/include/c++/9/bits/move.h:74
#18 std::allocate_shared<rclcpp::Node, std::allocator<rclcpp::Node>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (__a=...) at /usr/include/c++/9/bits/shared_ptr.h:702
#19 std::make_shared<rclcpp::Node, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> () at /usr/include/c++/9/bits/shared_ptr.h:718
#20 rclcpp::Node::make_shared<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&> () at /opt/ros/foxy/include/rclcpp/node.hpp:77
#21 main (argc=1, argv=0x7fffffffcf98) at /home/***/user_navigation.cpp:37
(gdb) 

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

No branches or pull requests

2 participants