How to start a ros node
How do I start a ros node from the terminal? For example I'm looking to start the node /camera/camera_nodelet_manager
but I have no idea how? Do I use rosrun?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
How do I start a ros node from the terminal? For example I'm looking to start the node /camera/camera_nodelet_manager
but I have no idea how? Do I use rosrun?
You can either use rosrun or manually execute the binary/script. In the first case, run:
rosrun <package_name> <executable_name>
In the second case look up the executable name (if you're using catking, it's usually in
<catkin_workspace>/devel/lib/<executable_name>
EDIT
I see what you want to do now! If you want the nodelet manager (that's the node you're looking for), then you should look at manager.launch.xml in rgbd_launch. In particular the lines that you're interested in are:
<!-- Nodelet manager -->
<node pkg="nodelet" type="nodelet" name="$(arg name)" args="manager"
output="screen" launch-prefix="$(arg launch_prefix)">
<param name="num_worker_threads" value="$(arg num_worker_threads)" />
</node>
where the name is set in the calling launch file (openni.launch, https://github.com/ros-drivers/openni... ).
Just remember that all roslaunch does is to call processes, so if roslaunch can do it then you can do it as well at the command line! For example if you want to run the nodelet above, just type:
>> rosrun nodelet nodelet manager _num_worker_threads:=4
To run openni for my Kinect, I have been using openni_launch:
$ roslaunch openni_launch openni.launch
$ rosrun rviz rviz #In new terminal window
I am new with ROS, so I feel your pain. From what I understand, you must have roscore running.
$ roscore
In a new terminal window, use rosrun to start your node:
$ rosrun [package_name] [node_name]
I hope this helps...
Asked: 2014-11-25 13:24:47 -0500
Seen: 16,864 times
Last updated: Nov 26 '14
ERROR: cannot launch node of type : can't locate node in package
rosrun gazebo spawn_model -file 'pwd'/object.urdf -urdf -z 1 -model my_object
Depth Camera Gazebo11 + ROS2 Foxy
Rapid Node Connecting/Disconnecting
How to launch node if param equals true?
Does Softkinetic have drivers for DS525?
ROS node bridge for publish special topics over the internet