ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ros node does not change its name after restart

asked 2011-08-25 19:25:57 -0500

2_socke gravatar image

Hello everybody,

actually I'm working on a c++ s-function in Matlab Simulink that is able to comunicate to ros. Therefore I initialize the ros node once by

ros::int(argc, argv, nodeName);

and terminate the node by


Therewith I can create and destroy a ros node.

The issue I have with this is, that after once starting and ending a simulink model, the ros node name can't be changed. Even by starting another model the node name is not changed. I tried changing nodeName and also the command line arguments argc and argv ( __name:=NodeName ). It only changes after a recompile of the s-function or by a restart of matlab. What can I do with this?

Many thanks for your answers in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-08-26 00:13:09 -0500

mrfloflo gravatar image

updated 2011-08-26 00:14:47 -0500

yeah that's a matlab problem. matlab caches the s-funtions

there is a brutal way by running:

  • clear all

or just unload every single s-function by using

  • clear fun s-function_name


edit flag offensive delete link more

Question Tools

1 follower


Asked: 2011-08-25 19:25:57 -0500

Seen: 334 times

Last updated: Aug 26 '11