An extendable RESTful API for Adept ACE written in C#
This is a C# RESTful API for the Adept ACE environment. This API was developed specifically to control a ViperS650 robot, but could be easily extended to control other robots. The goal of this project was to create a web API that would provide easy access to command and move the robot arm via standard HTTP requests. The initial purpose was to enable programming via a LabView program, but extends to anything that can issue standard HTTP GET and POST requests (e.g., JavaScript, Python, etc.).
server=ace@43434
as show in the video.client
not server=ace@43434
.
Open in Emulation Mode
and creating a workspace (which lets you select a robot to emulate) or load the one provided in this repo (ACE_Workspace.awp
) which emulates a Viper 650.START
it will start listening on localhost:9001
http://localhost:9001/api/docs/
on a browser of your choice.
dcos.json
and then run generate_docs.py
with python
. It requires you have the jinja2
package installed. To install it you can simply run pip install jinja2
.You can quickly test out API endpoints via the PowerShell by:
LOAD CONTROLLER
START SERVER
CartesianMove
on the robot, other endpoints may take different JSON payloads or none at all. Edit the X
, Y
, Z
, Yaw
, Pitch
, and Roll
with the desired values for the move to be executed.
PS > Invoke-WebRequest -UseBasicParsing http://localhost:9001/api/move/cartesian -ContentType "application/json" -Method POST -Body "{ 'Accel': 100, 'Decel': 100, 'Speed': 10, 'StraightMotion': true, 'MotionEnd': 'Blend', 'SCurveProfile': 0, 'X': 0, 'Y': 0, 'Z': 0, 'Yaw': 0, 'Pitch': 0, 'Roll': 0}"
JointMove
on the robot, other endpoints may take different JSON payloads or none at all. Edit the JointPosition
array in the JSON payload with the desired joint positions of the robot after the move.
PS > Invoke-WebRequest -UseBasicParsing http://localhost:9001/api/move/joints -ContentType "application/json" -Method POST -Body "{ 'Accel': 100, 'Decel': 100, 'Speed': 10, 'StraightMotion': true, 'MotionEnd': 'Blend', 'SCurveProfile': 0, 'JointPosition': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]}"
You will need to install some packages via the Package Manager Console in Visual Studio
PM> Install-Package Newtonsoft.Json
PM> Install-Package Nancy
PM> Install-Package Nancy.Hosting.Self
PM> Install-Package MaterialDesignThemes
Alternatively, you can enable the Package Restore function of NuGet within Visual Studio, and clean and build the project which should install the necessary packages automatically.