ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Yes, It is possible. You have to kill the node and You can restart that particular node again.
You can use this command, I think that will work for you.
system("roslaunch realsense2_camera rs_camera.launch"); //start
system("rosnode kill /camera/realsense2_camera"); //stop
You can also have a look at these links. These ways can be useful:
https://answers.ros.org/question/203154/is-it-possible-to-run-and-quit-launch-files-from-code-inside-a-node/ https://answers.ros.org/question/221077/killing-a-rosrun-process-using-python-script/ https://answers.ros.org/question/223090/start-or-stop-the-ros-node-in-another-node/
2 | No.2 Revision |
Yes, It is possible. You have to kill the node and You can restart that particular node again.
You can use this command, I think that will work for you.
system("roslaunch realsense2_camera rs_camera.launch"); //start
system("rosnode kill /camera/realsense2_camera"); //stop
You can also have a look at these links. These ways can be useful:
https://answers.ros.org/question/203154/is-it-possible-to-run-and-quit-launch-files-from-code-inside-a-node/
https://answers.ros.org/question/221077/killing-a-rosrun-process-using-python-script/
https://answers.ros.org/question/203154/is-it-possible-to-run-and-quit-launch-files-from-code-inside-a-node/
https://answers.ros.org/question/221077/killing-a-rosrun-process-using-python-script/
https://answers.ros.org/question/223090/start-or-stop-the-ros-node-in-another-node/
3 | No.3 Revision |
Yes, It is possible. You have to kill the node and You can restart that particular node again.
You can use this command, I think that will work for you.
system("roslaunch import os
os.system("roslaunch realsense2_camera rs_camera.launch"); //start
system("rosnode os.system("rosnode kill /camera/realsense2_camera"); //stop
You can also have a look at these links. These ways can be useful:
https://answers.ros.org/question/203154/is-it-possible-to-run-and-quit-launch-files-from-code-inside-a-node/
https://answers.ros.org/question/221077/killing-a-rosrun-process-using-python-script/
https://answers.ros.org/question/223090/start-or-stop-the-ros-node-in-another-node/
4 | No.4 Revision |
Yes, It is possible. You have to kill the node and You can restart that particular node again.
You can use this command, I think that will work for you.
import os
os.system("roslaunch realsense2_camera rs_camera.launch"); rs_camera.launch") //start
os.system("rosnode kill /camera/realsense2_camera"); /camera/realsense2_camera") //stop
You can also have a look at these links. These ways can be useful:
https://answers.ros.org/question/203154/is-it-possible-to-run-and-quit-launch-files-from-code-inside-a-node/
https://answers.ros.org/question/221077/killing-a-rosrun-process-using-python-script/
https://answers.ros.org/question/223090/start-or-stop-the-ros-node-in-another-node/