Ask Your Question
0

Problem in rosnode

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

Sudhan gravatar image

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

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
2

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

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

Comments

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 imageSudhan ( 2012-10-09 00:44:19 -0500 )edit
1

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 imageLorenz ( 2012-10-09 00:44:49 -0500 )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

Stats

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

Seen: 244 times

Last updated: Oct 09 '12