Skip to content

Commit

Permalink
Update __log_rosout_disable workaround to use --ros-args. (#216)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored Aug 28, 2019
1 parent b21de05 commit dcac89f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dynamic_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,16 +463,16 @@ int main(int argc, char * argv[])
// TODO(hidmic): remove when Fast-RTPS supports registering multiple
// typesupports for the same topic in the same process.
// See https://github.com/ros2/rmw_fastrtps/issues/265.
std::vector<char *> args(argv, argv + argc);
char log_disable_rosout[] = "__log_disable_rosout:=true";
std::vector<const char *> args(argv, argv + argc);

const char * rmw_implementation = "";
const char * error = rcutils_get_env("RMW_IMPLEMENTATION", &rmw_implementation);
if (NULL != error) {
throw std::runtime_error(error);
}
if (0 == strcmp(rmw_implementation, "") || NULL != strstr(rmw_implementation, "fastrtps")) {
args.push_back(log_disable_rosout);
args.push_back("--ros-args");
args.push_back("__log_disable_rosout:=true");
}
rclcpp::init(args.size(), args.data());

Expand Down

0 comments on commit dcac89f

Please sign in to comment.