ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How can i initialize a node with two ros_init options?

asked 2020-10-13 06:37:08 -0500

ros_newbie96 gravatar image

Hi I am using ros melodic on Ubuntu 18.04 and I want to use both of the following ros init options:

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

But this obviously wont work. Does someone know how to solve this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-13 08:08:08 -0500

pcoenen gravatar image
ros::init(argc, argv, "my_node_name", ros::init_options::AnonymousName + ros::init_options::NoSigintHandler);

init_options are bit flags, so you can just add them up.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-10-13 06:37:08 -0500

Seen: 233 times

Last updated: Oct 13 '20