ROS2 - Not able to echo the topic

asked 2020-03-19 03:16:24 -0500

kk2105 gravatar image

updated 2020-03-19 03:21:45 -0500

Hi,

There are similar questions related to this issue, however the answers provided are not much helpful.

I have 2 modules, module_1 publishing the topic_1 with custom msg type. And module_2 in which I want to echo the published topic.

I have already built the custom msg type in the module_2. However when I try to echo the topic I am facing the below error.
Initially, I was thinking this maybe because custom msg is not built. But in my case that is not the issue as I have already built the msg.

    system@LAPTOP:/ros_module$ ros2 topic echo /topic_1
    ========================================================================================
    Context     : DDS::OpenSplice::TypeSupport::register_type
    Date        : 2020-03-19T07:57:05+0000
    Node        : LAPTOP
    Process     : python3.6 <26331>
    Thread      : main thread 7f0a59980740
    Internals   : TypeSupport.cpp/79/6.9.190705OSS///-1
    ----------------------------------------------------------------------------------------
    Report      : Bad parameter: Could not register type 'custom_msg::msg::dds_::Newmsg_'.
    Internals   : DDS::OpenSplice::DomainParticipant::wlReq_load_type_support_meta_holder/DomainParticipant.cpp/2293/3/1584604625.514789082
    ----------------------------------------------------------------------------------------
    Report      : Deserialize failed
    Internals   : Type deserialize/sd_serializerXMLTypeinfo.c/2945/0/1584604625.514794671
    ----------------------------------------------------------------------------------------
    Report      : c_metaBind failed for Struct <Newmsg_> in scope <custom_msg::msg::dds_>.
    Internals   : sd_deserXmlStructure/sd_serializerXMLTypeinfo.c/2365/0/1584604625.514799140
    ----------------------------------------------------------------------------------------
    Report      : Redeclaration of 'custom_msgs::msg::dds_::Newmsg_' doesn't match existing declaration
    Internals   : c_metaObject::c_metaBind/c_metabase.c/272/0/1584604625.514803483
    Failed to create subscription: failed to register the type: custom_msgs::msg::dds_::Newmsg_TypeSupport.register_type: bad domain participant or type name parameter, at /tmp/binarydeb/ros-dashing-rmw-opensplice-cpp-0.7.3/src/rmw_subscription.cpp:133, at /tmp/binarydeb/ros-dashing-rcl-0.7.8/src/rcl/subscription.c:167

Kindly excuse me as I have recently started working on ROS2.

Thank you,
KK

edit retag flag offensive close merge delete