0
$\begingroup$

Rosanswers logo

I am writing my first package and find myself repeatedly changing names of things. This tells me I just do not fully understand all of the moving parts and their interplay.

  • Package name?
  • The package is a controller for a common 16 channel PWM board with an I2C interface.
  • Node name?
  • Service names?
  • The node has a few setup/configuration services - setting servo centers, turning all servos off, changing PWM frequency, linking servo channels, etc.
  • Subscriber names?
  • The node has a few subscribers to topics - setting absolute/relative speeds of one or more servos and handling Twist messages
  • Message names?
  • One of the topics uses the common Twist message.
  • The other topics use custom messages.
  • Are there any predefined Service message types - eg "single request integer with single response integer" or "no request input with no response output"?

Here are some possible strings to incorporate:

The package is being developed for a low cost robot platform which is shortened to locoro. Their will be other packages and nodes developed for this project. This first package is designed to drive any of the 16 channel PWM breakout board which uses the PCA9685 chip. The primary robotic use of the board is to control the servos and motors but will interface with any hardware which uses PWM. the most common / popular supplier of the board is Adafriut but it is also available from other companies.

I've read and re-read the tutorials and guides. This has been part of why i find myself continually changing the names as the guidance I'd gleaned has lead to multiple interpretations for a novice.

Guidance and suggestions are appreciated.


Originally posted by suforeman on ROS Answers with karma: 300 on 2016-11-10

Post score: 1


Original comments

Comment by gvdhoorn on 2016-11-10:
You must've already some idea for some of these things. To make this question a little less open-ended, you could include what you currently have.

Comment by suforeman on 2016-11-10:
You can get a sense of my indecisiveness with the package name:

pwm16i2c_controller locoro_pwm16 ('locoro' is the over arching project) i2cpwm16ctrl i2cpwm_board

Comment by gvdhoorn on 2016-11-11:
At least for packages you could take a look at REP-144: "ROS Package Naming".

Comment by suforeman on 2016-11-11:
Yes, I have read through REP-11. In re-reading the first comment, I realized I should include the various strings I am working with. I've updated the original question.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

After lots of reading and a few more changes, I chose the following:

package:     i2cpwm_board
node:        i2cpwm_board
source code: i2cpwm_controller.cpp

services:    config_drive_mode()
             config_servos()

topics:      servos_absolute()
             servos_proportional()
             servos_drive()

My decision was not 100% intuitive but I had to make some guesses and ultimately code and move on. The service names work well as they are "action subject". The topics are a bit less intuitive but they all act on servos to make them move. The progress from least amount of control logic to most amount of control logic.

I'm happy to get additional feedback and if there are better suggestions.


Originally posted by suforeman with karma: 300 on 2016-11-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ahendrix on 2016-11-19:
i2cpwm is a pretty boring name. Does the board have a model name or model number that you can use instead?

Comment by ahendrix on 2016-11-19:
For no-request, no-response services, there is a standard Trigger service type in std_srvs

Comment by suforeman on 2016-11-19:
There is a popular product for the I2C PWM board. However, there are also lots of clones and variants. Rather than include the manufacturer's name in the package, I have it on the mainpage of the documentation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.