Ask Your Question
0

How to name a rosserial_arduino node?

asked 2017-02-11 22:57:39 -0500

Cerin gravatar image

How do you give a name to a rosserial_arduino node? There are several good examples, but none of them specify a name, resulting in the published topics and listeners appearing in the root namespace.

Normally, a node's name is specified with ros::init(argc, argv, "some_name"); but it doesn't look like rosserial_arduino supports this.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-02-12 05:18:52 -0500

duck-development gravatar image

updated 2017-02-12 05:20:34 -0500

you can chage the node name with an ros Lauch file

here my code in my Launch file:

<node pkg="rosserial_python" type="serial_node.py" name="serial_stepper_node">
  <param name="port" value="/dev/ttyUSB0"/>
</node>
edit flag offensive delete link more

Comments

Apparently, I can also do the same thing with a <group ns="some_name"> tag.

Cerin gravatar imageCerin ( 2017-02-12 14:12:47 -0500 )edit
0

answered 2017-02-12 07:53:07 -0500

gvdhoorn gravatar image

IIRC, rosserial will always publish using global names.

I've seen people push the rosserial node(s) into a namespace to change that.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-02-11 22:57:39 -0500

Seen: 297 times

Last updated: Feb 12 '17