ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
753 stars 914 forks source link

rospy.init_node anonymous argument can't be forced #1460

Open machinekoder opened 6 years ago

machinekoder commented 6 years ago

Thanks to https://github.com/ros/ros_comm/blob/melodic-devel/clients/rospy/src/rospy/client.py#L290-L295 the anonymous argument of rospy.init_node is always overwritten by roslaunch. This is in particular problematic when creating a ROS node inside a Python process.

I suggest adding a force_anonymous argument to init_node for these (probably rare) cases where node anonymity is wanted, regardless of the roslaunch configuration.

machinekoder commented 6 years ago

also see https://answers.ros.org/question/297918/rospyinit_node-in-multiprocessingprocess/?answer=297921#post-id-297921