ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The turtlesim window is a separate executable. Typically, C++ does not support running executable from code. Typically you have to use the system()
command to do so.
I'm not sure what the end goal is, but there are a couple of options I can think of:
If you're trying to launch turtlesim at the same time as one of your own executables, I would suggest roslaunch.
If you're looking to do something that you cannot do via turtlesim's topics and services, I would suggest looking at the code for turtlesim in the turtlesim package (probably in the src
directory).
If you edit your question to be more specific as to the goal, I might be able to help further.
2 | No.2 Revision |
The turtlesim window is a separate executable. Typically, C++ does not support running executable from code. Typically you have to use the system()
command to do so. But, there is also a system called rosspawn that might just do what you want it to do.
I'm not sure what the end goal is, but there are a couple of options I can think of:
If you're trying to launch turtlesim at the same time as one of your own executables, I would suggest roslaunch.
If you're looking to do something that you cannot do via turtlesim's topics and services, I would suggest looking at the code for turtlesim in the turtlesim package (probably in the src
directory). You might be able to modify it to your needs.
If you edit your question to be more specific as to the goal, I might be able to help further.