While implementing Actions, Topics and Services I ran into a minor inconvenience; to instantiate each of these types it's rather inconsistent.
You can instantiate a (ROS2) Action without defining TGoal, TFeedback and TResult. Because it defaults to unknown. This is great when you're actively developing and don't know the definition just yet.
ref:
/**
* A ROS 2 action client.
*/
export default class Action<
TGoal = unknown,
TFeedback = unknown,
TResult = unknown,
> {
This isn't the case for Topic and Service. So for every new instance you create of these two you have to define their related types. When working with Webstorm (Which forces you to fill them in and fair) this is quite annoying.
Ref:
/**
* Publish and/or subscribe to a topic in ROS.
*
* Emits the following events:
* * 'warning' - If there are any warning during the Topic creation.
* * 'message' - The message data from rosbridge.
*/
export default class Topic<T> extends EventEmitter<{
And:
/**
* A ROS service client.
*/
export default class Service<TRequest, TResponse> extends EventEmitter {
While implementing Actions, Topics and Services I ran into a minor inconvenience; to instantiate each of these types it's rather inconsistent.
You can instantiate a (ROS2)
Actionwithout definingTGoal,TFeedbackandTResult. Because it defaults tounknown. This is great when you're actively developing and don't know the definition just yet.ref:
This isn't the case for
TopicandService. So for every new instance you create of these two you have to define their related types. When working with Webstorm (Which forces you to fill them in and fair) this is quite annoying.Ref:
And: