Ask Your Question
0

is /1234 a valid topic name

asked 2015-09-21 09:17:28 -0500

elthef gravatar image

I would like to know if /1234 a valid topic name ? Any where mention the requirement of topic name ? Thank you Edwin

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-09-21 09:21:11 -0500

NEngelhard gravatar image

updated 2015-09-21 09:32:23 -0500

Naming conventions can be found here: http://wiki.ros.org/Names

1.1.1 Valid Names

A valid name has the following characteristics:

  1. First character is an alpha character ([a-z|A-Z]), tilde (~) or forward slash (/)

  2. Subsequent characters can be alphanumeric ([0-9|a-z|A-Z]), underscores (_), or forward slashes (/)

Your name starts with a "/" and then consists of alphanumeric charactes, so it's a valid topic name.

edit flag offensive delete link more

Comments

1

Correct information cited, but the first character is only alpha, not alphanumeric. So this is NOT a valid topic name.

dornhege gravatar image dornhege  ( 2015-09-21 10:06:29 -0500 )edit
1

The first character is a forward slash, which is a valid first character. (And I can create a publisher for this topic without problems or warnings.)

NEngelhard gravatar image NEngelhard  ( 2015-09-21 10:26:44 -0500 )edit

Interesting. It seems that a topic like /_ would be valid.

dornhege gravatar image dornhege  ( 2015-09-21 12:43:10 -0500 )edit

The intent is that each token must start with an alpha. The ~ is a special replacement and the / is a joiner. I don't know how it's exactly enforced in the different implementations. In the spirit of things starting with a number for a token is not valid.

tfoote gravatar image tfoote  ( 2018-06-20 13:28: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

1 follower

Stats

Asked: 2015-09-21 09:17:28 -0500

Seen: 448 times

Last updated: Sep 21 '15