Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding some functions to resolve ros message type #49

Merged
merged 12 commits into from
Oct 16, 2013

Conversation

garaemon
Copy link
Contributor

  1. Ros.getTopicType
    A wrapper of /rosapi/topic_type
  2. Ros.getMessageDetails
    A wrapper of /rosapi/message_details
  3. Ros.decodeTypeDefs: adding a utility function to resoluve ros message definition
    The function convert the result of getMessageDetail into a dictionary.
    For example, sensor_msgs/JointState will be converted like:
{
  "header": {
    "seq": "uint32",
    "stamp": "time",
    "frame_id": "string"
  },
  "name": [
    "string"
  ],
  "position": [
    "float64"
  ],
  "velocity": [
    "float64"
  ],
  "effort": [
    "float64"
  ]
}

@rctoris
Copy link
Contributor

rctoris commented Oct 16, 2013

Hi @garaemon -- great start! These are indeed so very useful functions. There a few convention, style, and minor bugs in the file which is also preventing it from properly running through our Grunt build (Travis-CI build output here: https://travis-ci.org/RobotWebTools/roslibjs/builds/12611739). We have listed our guide here as well: http://wiki.ros.org/JavaScriptStyleGuide -- building locally can also be found here: https://github.com/RobotWebTools/roslibjs/tree/devel/utils

I'll add some comments where I see some errors in the pull (also note it will be looking for 2-space indentation).

type: message
});
messageDetailClient.callService(request, function(result) {
var typedefs = result.typedefs;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are never using this local variable.

@garaemon
Copy link
Contributor Author

I've fixed the points you mentioned.

rctoris added a commit that referenced this pull request Oct 16, 2013
adding some functions to resolve ros message type
@rctoris rctoris merged commit e6df311 into RobotWebTools:devel Oct 16, 2013
k-aguete pushed a commit to k-aguete/roslibjs that referenced this pull request Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants