if __name__ == '__main__':
rospy.init_node('ardrone_action_server')
ArdroneAS()
rospy.spin()
I have initialized the node with rospy but should I name the node identical with the name in python script?
Below is the launch file:
<launch>
<node name="ardrone_as" pkg="ardrone_as" type="action_server.py" output="screen">
</node>
Only the node name is showing in the launch file when running. Why is that?
This is the common behavior of setting the node name in a launch files. It remaps (overrides) the node name which is defined in code. You can find the specification of this at chapter 5 of the ROS node documentation:
__name is a special reserved keyword for "the name of the node." It lets you remap the node name without having to know its actual name. It can only be used if the program that is being launched contains one node.