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

Fix getParam returned value #1

Merged
merged 1 commit into from
Nov 11, 2020
Merged

Conversation

knuesel
Copy link
Contributor

@knuesel knuesel commented Nov 11, 2020

Hi, thanks for making this package! This PR fixes an error I get when runningdartros_example.dart:

Unhandled exception:
type 'Future<dynamic>' is not a subtype of type 'Future<String>'
#0      RosXmlRpcClient.getMasterUri (package:dartros/src/ros_xmlrpc_client.dart:330:36)
#1      NodeHandle.getMasterUri (package:dartros/src/node_handle.dart:30:41)
#2      main (file:///home/j/codiman/rosclient/dartros/example/dartros_example.dart:5:12)

It also fixes a similar error in lookupNode, and makes the example's output a bit clearer by setting the parameter to a non-default value.

I wanted to add a test, but I can't get the code to run in the latest version, I think there's a commit missing in std_msgs_dart, adding the $prototype variable?

@TimWhiting
Copy link
Collaborator

Hi, I wasn't aware of anyone besides my research lab using this. Thanks for the feedback and the PR. Tested it locally and it worked. I'll try adding tests later. I just updated yesterday to use a new message generation format. Now, I'm using the prototype variable. Maybe try doing a pub upgrade and making sure that you have version 0.0.3 of std_msgs? Sorry I don't have much documentation yet. My priority has just been to get it working well. Hope you were able to figure out the message generation for your own project.

@TimWhiting TimWhiting merged commit 3893bcb into ros2dart:master Nov 11, 2020
@TimWhiting
Copy link
Collaborator

TimWhiting commented Nov 11, 2020

@knuesel Just published 0.0.4+3 with the fix.

@knuesel
Copy link
Contributor Author

knuesel commented Nov 12, 2020

Thanks for the quick merge! That will make it two labs then :) (I'm in the initial stage of research project that will use Flutter and ROS).

For std_msgs I think there's a commit that hasn't been pushed, the master branch still has version 0.0.2: https://github.com/TimWhiting/std_msgs_dart/blob/master/pubspec.yaml

@TimWhiting
Copy link
Collaborator

Cool, I'll fix the std_msgs master branch. But you should be able to use the version on pub.dev: https://pub.dev/packages/std_msgs

@TimWhiting
Copy link
Collaborator

TimWhiting commented Nov 12, 2020

@knuesel Also, for your information if you add this ros package to your workspace it should generate dartros messages for all of your custom messages: https://github.com/TimWhiting/gendart

@knuesel
Copy link
Contributor Author

knuesel commented Nov 12, 2020

Ah sorry I didn't realize that pub.dev could have a more recent version than GitHub. Thanks for the pointer to gendart.

@TimWhiting
Copy link
Collaborator

Yes, there are a few message packages that I had to publish to pub.dev since they are depended on by dartros itself. I'm currently debating whether to also publish sensor_msgs, and geometry_msgs since they are widely used.

@TimWhiting
Copy link
Collaborator

TimWhiting commented Nov 12, 2020

I'm going to add a few issues about documentation for this. Feel free to contribute documentation in places where something is not obvious. I know most people are coming from a rospy or roscpp background, and this is based more off of rosnodejs.

Updated:
Issues: #5 #4

@knuesel
Copy link
Contributor Author

knuesel commented Nov 13, 2020

I'll see what it takes to make this work with my project and update the documentation accordingly (although the project uses actions so it might be a while before it runs?)

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