ROS
I do not know NodeJS, but I am using ROS for some years now, so I can give you some information about it.
ROS is modularized and has a nice publisher/subscriber system to exchange messages between the individual modules (called nodes in ROS jargon) using callback functions.
Typically you have a separate node for each task and for each sensor.
A "task node" that needs some data, subscribes to a specific topic and registers a callback function.
A "sensor node" fetches data from the sensor, wraps the data in a message and publishes this message to a topic.
The callback functions of all nodes, that have subscribed to this topic are automatically called, every time a new message is published.
This way it is easy to exchange data between individual nodes and you can easily exchange parts of your program, e.g. if you want to use an other sensor or if the task changed.
It is further very easy to subscribe to nodes that are running on a different machine in the network, so you can send data from your laptop to the drone without additional effort (given they are connected to the same network).
ROS supports both C++ and Python. There are also bindings for Java, JavaScript and LISP, but I do not know how complete and stable they are (never used on of them).
In addition to the core framework, ROS ships with many useful modules and a nice visualization tool and has a comprehensive beginner tutorial.