ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
![]() | 1 | initial version |
I wonder how the functions in this file are called when there's no mention of
RGBDNode
anywhere outside that file.
RGBDNode
appears to be a class defined in appliedAI-Initiative/orb_slam_2_ros/ros/include/RGBDNode.h.
![]() | 2 | No.2 Revision |
I wonder how the functions in this file are called when there's no mention of
RGBDNode
anywhere outside that file.
RGBDNode
appears to be a class defined in appliedAI-Initiative/orb_slam_2_ros/ros/include/RGBDNode.h.
Anyone know how
int main()
in that file is run?
I'm not sure I follow: can you explain what exactly is unclear?
![]() | 3 | No.3 Revision |
How are nodes run?
A node is "just" a regular program that happens to use the ROS middleware for most of its input, output and control flow / coordination (ie: callbacks, timers, etc).
So nodes are run as any other program: by starting them from a shell (manually) or from another program (ie: roslaunch
).
I wonder how the functions in this file are called when there's no mention of
RGBDNode
anywhere outside that file.
RGBDNode
appears to be a class defined in appliedAI-Initiative/orb_slam_2_ros/ros/include/RGBDNode.h.
Anyone know how
int main()
in that file is run?
I'm not sure I follow: can you explain what exactly is unclear?
![]() | 4 | No.4 Revision |
How are nodes run?
A node is "just" a regular program that happens to use the ROS middleware for most of its input, output and control flow / coordination (ie: callbacks, timers, etc).
So nodes are run as any other program: by starting them from a shell (manually) or from another program (ie: roslaunch
).
I wonder how the functions in this file are called when there's no mention of
RGBDNode
anywhere outside that file.
RGBDNode
appears to be a class defined in appliedAI-Initiative/orb_slam_2_ros/ros/include/RGBDNode.h.
Anyone know how
int main()
in that file is run?
I'm not sure I follow: can you explain what exactly is unclear?
Edit:
If my understanding is correct, it references to a node called
orb_slam2_rgbd
in a file calledorb_slam2_ros_rgbd
.
Binaries (ie: programs, nodes, librarie) can be made up of many source files. In the case of orb_slam2_ros_rgbd
, the node comprises two source files which in the end get combined into a single binary. See here for the add_executable(..)
call in the project's CMakeLists.txt
which configures all of this.
But there isn't a file called
orb_slam2_ros_rgbd
or a class calledorb_slam2_rgbd
.
I hope it is now clear that there doesn't need to be any source file with that name: as long as there is a binary with that name that roslaunch
can find (and there is, as it gets created as a result of the build).
There is no one-to-one correspondence necessarily between classes/files and binaries.
![]() | 5 | No.5 Revision |
How are nodes run?
A node is "just" a regular program that happens to use the ROS middleware for most of its input, output and control flow / coordination (ie: callbacks, timers, etc).
So nodes are run as any other program: by starting them from a shell (manually) or from another program (ie: roslaunch
).
I wonder how the functions in this file are called when there's no mention of
RGBDNode
anywhere outside that file.
RGBDNode
appears to be a class defined in appliedAI-Initiative/orb_slam_2_ros/ros/include/RGBDNode.h.
Anyone know how
int main()
in that file is run?
I'm not sure I follow: can you explain what exactly is unclear?
Edit:
If my understanding is correct, it references to a node called
orb_slam2_rgbd
in a file calledorb_slam2_ros_rgbd
.
Binaries (ie: programs, nodes, librarie) can be made up of many source files. In the case of orb_slam2_ros_rgbd
, the node comprises two source files which in the end get combined into a single binary. See here for the add_executable(..)
call in the project's CMakeLists.txt
which configures all of this.
add_executable (${PROJECT_NAME}_rgbd
ros/src/RGBDNode.cc
ros/src/Node.cc
)
But there isn't a file called
orb_slam2_ros_rgbd
or a class calledorb_slam2_rgbd
.
I hope it is now clear that there doesn't need to be any source file with that name: as long as there is a binary with that name that roslaunch
can find (and there is, as it gets created as a result of the build).
There is no one-to-one correspondence necessarily between classes/files and binaries.
![]() | 6 | No.6 Revision |
How are nodes run?
A node is "just" a regular program that happens to use the ROS middleware for most of its input, output and control flow / coordination (ie: callbacks, timers, etc).
So nodes are run as any other program: by starting them from a shell (manually) or from another program (ie: roslaunch
).
I wonder how the functions in this file are called when there's no mention of
RGBDNode
anywhere outside that file.
RGBDNode
appears to be a class defined in appliedAI-Initiative/orb_slam_2_ros/ros/include/RGBDNode.h.
Anyone know how
int main()
in that file is run?
I'm not sure I follow: can you explain what exactly is unclear?
Edit:
The node is meant to be run using, e.g.,
roslaunch orb_slam2_ros orb_slam2_r200_rgbd.launch
but
orb_slam2_r200_rgbd.launch
calls ths node using<node name="orb_slam2_rgbd" pkg="orb_slam2_ros" type="orb_slam2_ros_rgbd" output="screen">
If my understanding is correct, it references to a node called
orb_slam2_rgbd
in a file calledorb_slam2_ros_rgbd
.
No, the node
line looks for a binary called orb_slam2_ros_rgbd
and gives the ROS node (ie: the running instance of that binary) the name orb_slam2_rgbd
. See also the roslaunch/XML/node - Attributes page.
Binaries (ie: programs, nodes, librarie) can be made up of many source files. In the case of orb_slam2_ros_rgbd
, the node comprises two source files which in the end get combined into a single binary. See here for the add_executable(..)
call in the project's CMakeLists.txt
which configures all of this:
add_executable (${PROJECT_NAME}_rgbd
ros/src/RGBDNode.cc
ros/src/Node.cc
)
But there isn't a file called
orb_slam2_ros_rgbd
or a class calledorb_slam2_rgbd
.
I hope it is now clear that there doesn't need to be any source file with that name: as long as there is a binary with that name that roslaunch
can find (and there is, as it gets created as a result of the build).
There is no one-to-one correspondence necessarily between classes/files and binaries.