Skip to content

Commit

Permalink
Fix dds_ros_bridge shutdown so it exits cleanly
Browse files Browse the repository at this point in the history
Nodelet caused segfault on shutdown which prevented its reload
(manager died with it).

DDS objects were attempting read/close operations after factory
was destroyed leading to segfault inside soraCore.

Order of declaration matters, this change lets the factory be the
last soraCore reference to be destroyed.
  • Loading branch information
Ruben Garcia committed Jul 12, 2024
1 parent 9db1aa8 commit 2872bd9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ class DdsRosBridge : public ff_util::FreeFlyerNodelet {
ros::Publisher robot_name_pub_;
ros::ServiceServer srv_set_telem_rate_;

std::map<std::string, ff::RosSubRapidPubPtr> ros_sub_rapid_pubs_;
std::shared_ptr<kn::DdsEntitiesFactorySvc> dds_entities_factory_;
std::map<std::string, ff::RosSubRapidPubPtr> ros_sub_rapid_pubs_;
std::string agent_name_, participant_name_;
std::vector<ff::RapidPubPtr> rapid_pubs_;
std::vector<ff::RapidSubRosPubPtr> rapid_sub_ros_pubs_;
Expand Down

0 comments on commit 2872bd9

Please sign in to comment.