Skip to content

ROS wrapper for gflags that fixes the cmake issue in Ubuntu 14.04

Notifications You must be signed in to change notification settings

davetcoleman/gflags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gflags ROS Wrapper

Motivation

It's broken in Ubuntu 14.04 gflags/gflags#120

About

https://gflags.github.io/gflags/

Usage

In your package's package.xml:

<build_depend>gflags</build_depend>

In your package's CMakeLists:

find_package(catkin REQUIRED COMPONENTS
  gflags
)

In your code's header:

// Command line arguments
#include <gflags/gflags.h>

DEFINE_int32(mode, 2, "Mode");

In your main() function:

google::SetVersionString("0.0.1");
google::SetUsageMessage("Explanation of what this node does");
google::ParseCommandLineFlags(&argc, &argv, true);

ros::init(argc, argv, "MyNode", ros::init_options::AnonymousName);

int mode = FLAGS_mode;

About

ROS wrapper for gflags that fixes the cmake issue in Ubuntu 14.04

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages