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

Fix memory error due to missing rosout_disable_topics_generation para… #1507

Merged
merged 3 commits into from
Sep 21, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion clients/roscpp/src/libros/rosout_appender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ namespace ros

ROSOutAppender::ROSOutAppender()
: shutting_down_(false)
, disable_topics_(false)
, publish_thread_(boost::bind(&ROSOutAppender::logThread, this))
{
AdvertiseOptions ops;
Expand Down Expand Up @@ -106,7 +107,10 @@ void ROSOutAppender::log(::ros::console::Level level, const char* str, const cha

// check parameter server/cache for omit_topics flag
// the same parameter is checked in rosout.py for the same purpose
ros::param::getCached("/rosout_disable_topics_generation", disable_topics_);
if (!ros::param::getCached("/rosout_disable_topics_generation", disable_topics_))
{
disable_topics_ = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't need this if the default is set in the initializer, right?

}

if (!disable_topics_){
this_node::getAdvertisedTopics(msg->topics);
Expand Down