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

Adding a ROS node

asked 2016-08-08 12:08:26 -0500

muscles gravatar image

I made a ROS node by simply doing some scripting in Python. Now, when I do rosnode list, it displays the list of all the active nodes. Now, I want to know how can I add the node to the list of already developed nodes ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-08-08 13:03:27 -0500

ahendrix gravatar image

rosnode list lists the running ROS nodes (I'm not sure what you mean by "developed")

if you want your node to appear in rosnode list you just run it.

edit flag offensive delete link more
0

answered 2016-08-08 13:10:55 -0500

muscles gravatar image

How can I run it. I have a package called sensor, inside sensor I have a script folder inside script folder I have sensor_link.py, which reads sensor data and converts that data into a MAVLink message. I made another node sensor_link1.py inside script. Now can you please tell me how can I run this node so it is visible in rosnode list ?

edit flag offensive delete link more

Comments

If your script is a standalone ROS node you can run it with rosrun, the same way you run the existing node. If your script provides a library for accessing a sensor, you'll need to find the ROS node that uses the existing library, modify it to use your new library, and then run it.

ahendrix gravatar image ahendrix  ( 2016-08-08 14:03:53 -0500 )edit

Dear I tried it using rosrun. For my existing node sensor_link.py I ran rosrun sensor sensor_link.py and it started without an error. Then I made a new node for my testing named sensor_link1.py and tested it using rosrun. After running rosrun sensor sensor_link1.py I got an error on the console

muscles gravatar image muscles  ( 2016-08-08 14:47:49 -0500 )edit

" Couldn't find executable named sensor_link1.py, below path to the package

muscles gravatar image muscles  ( 2016-08-08 14:48:48 -0500 )edit
1

You probably need to enable the execute permissions on your new node: chmod u+x sensor_link1.py

ahendrix gravatar image ahendrix  ( 2016-08-08 15:00:54 -0500 )edit

Alright . Thank You very much. That was helpful

muscles gravatar image muscles  ( 2016-08-08 16:23:24 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-08 12:08:26 -0500

Seen: 1,354 times

Last updated: Aug 08 '16