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
Segfault creating a publisher in MoveIt 2 Example, only with Fast DDS RMW #1118
Comments
By the way, the message definition in question is here: https://github.com/ros-planning/moveit_msgs/blob/ros2/msg/DisplayTrajectory.msg I tried making a simple publisher using this message definition, following the |
either @Barry-Xu-2018 or @iuhilnehc-ynos do you have bandwidth to check this? |
From the exception message, bool
find_and_check_topic_and_type(
const CustomParticipantInfo * participant_info,
const std::string & topic_name,
const std::string & type_name,
eprosima::fastdds::dds::TopicDescription ** returned_topic,
eprosima::fastdds::dds::TypeSupport * returned_type)
{
// Searchs for an already existing topic
*returned_topic = participant_info->participant_->lookup_topicdescription(topic_name);
if (nullptr != *returned_topic) {
if ((*returned_topic)->get_type_name() != type_name) {
return false;
}
} I guess you created another publisher with the same name but different types somewhere. |
I quickly tested Not sure if NOTE: I metioned it in ros2/ros2#1095 (comment) @sea-bass I suggest that you can use different topic names to solve this issue while using different type names. |
Thanks @iuhilnehc-ynos -- I will go through and see if there actually were multiple types assigned to the same topic, as that would be a bug on our side to fix. |
@Abishalini found the bug. We indeed had an accidental copy-paste error where we had two message types on the same topic. Thanks! |
This issue has been mentioned on ROS Discourse. There might be relevant details there: |
Bug report
Required Info:
Steps to reproduce issue
We tried running some of our MoveIt Tutorials on the latest version of ROS 2 Rolling, and ran into a segfault creating a publisher that only occurs with Fast DDS as the middleware -- switching to Cyclone DDS resolves the issue.
Our code snippet that fails is:
where the segfault is:
Expected behavior
Should work with all RMW implementations.
Actual behavior
Segfaults with Fast DDS, which is the default RMW.
The text was updated successfully, but these errors were encountered: