Defining object APIs

OK, I'm working on an API for a robotics system, my strategy is to define a small workable API that is extensible. The robot will be divided into logical functional objects of varying levels of complexity.

The first object I am thinking about is the robot "base." Imagine you had a simplified API to a robotic base. The base may be legged, wheeled, pogo-sticked, or overcraft it should not matter.

What is a reasonable control structure for such an API?

Velocity: set velocity Set vector/curve?

Position: move to position report estimated position move to position at speed

Do I build more functionality than that into the base, instead relying on higher level objects to control the base?

What do you think?

Reply to
mlw
Loading thread data ...

We went with:

define endpoints

make endpoints advertised across the network

use broadcast to transmit data to all recipients.

use point-to-point to send the data back.

Then you just name an endpoint as "Left_Motor_Velocity", send a value to it, and that sets the corresponding thing on the robot.

cheers, Rich.

Reply to
Rich Walker

"mlw"

Download and read the JAUS specification documents. There are a couple of them, but the last one I think (the one that really defines the communication messages) is pretty complete and will give you lots of insights. They have a common API for all you mentioned and something more. I did not use their API (messaging structure), but I got some pretty good ideas from their documentation. They've been working on the specification of JAUS for quite some time now.

Cheers

Padu

Reply to
Padu

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.