ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Problem in rosnode

asked 2012-10-08 23:59:37 -0600

Sudhan gravatar image

updated 2014-01-28 17:13:53 -0600

ngrennan gravatar image

In rgbdslam package, I wrote a '--.cpp' file and built a node from that file. I often used to edited the cpp file and rebuilt the package. But later on I changed the name of the node to be built and deleted the old node manually (from the bin folder). Building the package was successful. When I run new node, and check it using

$ rosnode list

It shows the name of old node which I deleted and cannot find the name of the new node in the list.

When I tried,

$ rosnode info (name of the new node)

It reports as unknown node.

Any suggestions how to solve this problem?

And thanks in advance for your suggestions

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-09 00:09:51 -0600

Lorenz gravatar image

A node's name is set by using the __name:=my_node_name parameter or, if the parameter is not specified by the name you pass in the call to ros::init. Note that roslaunch always wants a node name specified in launch files and uses the __name parameter internally.

edit flag offensive delete link more


I mentioned the node name in cmakelists.txt as

rosbuild_add_executable(newnode src/new.cpp).

I run the node from $ rosrun pkg_name newnode.

The problem is I cannot find the newnode in the list of running nodes. When I tried info about the newnode it reports as unknown node.

Sudhan gravatar image Sudhan  ( 2012-10-09 00:44:19 -0600 )edit

The binary name has nothing to do with the node name as it appears in rosnode list. As i said, it's only determined by the name passed to ros::init or the __name parameter.

Lorenz gravatar image Lorenz  ( 2012-10-09 00:44:49 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-10-08 23:59:37 -0600

Seen: 458 times

Last updated: Oct 09 '12