ROS stand alone node

조회 수: 1 (최근 30일)
Vincent Talon
Vincent Talon 2017년 9월 18일
댓글: Sebastian Castro 2017년 9월 19일
I created a ROS node in Simulink. It consumes several Topic like the lidar /scan and return information of control of the electric motors in the form of twist. My node is embedded on the turtlebot. When I embark the node, it works well the first time (ie just after compiling and loading the node on the turtlebot). But if I turn off the turtlebot and the next day I want to restart ... I have not found how to call a Matlab node created on previous sessions  I should create a launch file ? In the package, I have the CMakeList.txt and the package.xml In the files created by Matlab during the compilation, there is /devel/setup.bash ... but it is quasi empty ? when should I make a source of this file Does anyone have a clear process of how to do with ROS / Matlab to create a "standalone" node, especially on the reuse node / package one larger robot target? What we should do What to do to reuse a node. By describing the steps by steps what we should do. Thank you in advance

답변 (1개)

Sebastian Castro
Sebastian Castro 2017년 9월 19일
You should be able to use rosdevice for this.
You can create a ROS device object and query the available autogenerated nodes as follows:
r = rosdevice;
r.AvailableNodes
If you have the name of the generated node, then you can say
runNode(r,'myNodeName');
- Sebastian
  댓글 수: 2
Vincent Talon
Vincent Talon 2017년 9월 19일
Sorry, maybe not was very clear. In my case, I try to restart the node ROS created with Matlab but without more use Matlab; I want to launch the ROS node in standalone on the Turtlebot without ever connecting to Matlab. It same, if I have create the node in Python or C++.
Sebastian Castro
Sebastian Castro 2017년 9월 19일
Oh, I see! The generated nodes make it to the following folder:
CATKIN_WORKSPACE/devel/lib/MODELNAME/
Then, the executable will be in that folder, under the name MODELNAME_node.
- Sebastian

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Specialized Messages에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by