Skip to content

Action Server Support#65

Merged
IanTheEngineer merged 1 commit intokinetic-develfrom
actionServer
Oct 19, 2017
Merged

Action Server Support#65
IanTheEngineer merged 1 commit intokinetic-develfrom
actionServer

Conversation

@chris-smith
Copy link
Copy Markdown
Collaborator

-Adds interface for ActionServers
-Adds experimental ActionServer implementation. I
assume there are still bugs here. Protocol generally
unspecified - had to hunt through actionlib source code.
-Renames ActionClient to ActionClientInterface.
-Adds time utilities.
-Throw useful errors when invalid message type was specified.

Copy link
Copy Markdown
Member

@IanTheEngineer IanTheEngineer left a comment

Choose a reason for hiding this comment

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

Looks good, just a few small comments & logging requests.

Comment thread src/actions/ActionServer.js Outdated

let handle = this._getGoalHandle(newGoalId);

let AddedGoal
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see this variable being used elsewhere. Should it be removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

seems like it

Comment thread src/actions/GoalHandle.js Outdated
this._publishResult(result);
break;
default:
// FIXME: log errors for invalid state transitions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As a reference, perhaps toss in this link:
http://wiki.ros.org/actionlib/DetailedDescription#Server_Description
to aid the future fixer :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In the mean time, just logging any error about an unknown transition would be helpful...

Comment thread src/utils/XmlrpcClient.js
else if (resp[0] !== 1) {
const error = new Error('ROS XMLRPC Error');
const msg = resp[1];
const error = new Error(`ROS XMLRPC Error: ${msg}`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this fixing a separate bug?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This isn't a bug - this is a response from a remote XMLRPC server that indicates some problem in handling the request. It will happen if you try to get a parameter or lookup a service that doesn't exist.

http://wiki.ros.org/ROS/Master_Slave_APIs

Comment thread src/utils/time_utils.js

'use strict';

const NSEC_TO_SEC = 1e-9;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 for actual constants!

@IanTheEngineer
Copy link
Copy Markdown
Member

Appears this branch needs to be rebased...

-Adds interface for ActionServers
-Adds experimental ActionServer implementation. I
 assume there are still bugs here. Protocol generally
 unspecified - had to hunt through actionlib source code.
-Renames ActionClient to ActionClientInterface.
-Adds time utilities.
-Throw useful errors when invalid message type was specified.
@IanTheEngineer IanTheEngineer merged commit fd90f64 into kinetic-devel Oct 19, 2017
@chris-smith chris-smith deleted the actionServer branch March 5, 2018 22:11
Comment thread src/index.js
getActionClient(options) {
options.nh = this.nh;
return new ActionClient(options);
return this.nh.actionClientInterface(options);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't actually work. The invoked function doesn't take an object as argument, it requires the server and type to be broken out. I'll create a PR to fix that.

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.

3 participants