feat(aubo): add CSV teaching trajectory recording and smooth replay

This commit is contained in:
linbo 2026-10-29 11:58:50 +08:00
parent 696d198801
commit 3b14ca97e6
60 changed files with 18263 additions and 1221 deletions

View File

@ -1,5 +1,6 @@
add_library(aubo_arm SHARED
src/aubo_arm.cpp
src/aubo_trajectory_csv.cpp
)
find_package(Threads REQUIRED)
@ -33,12 +34,16 @@ target_link_libraries(aubo_arm
glog
jsoncpp
Threads::Threads
cmvr_es::joint_trajectory_smoother
)
add_library(cmvr_es::device::aubo_arm ALIAS aubo_arm)
install(TARGETS aubo_arm LIBRARY DESTINATION lib)
if(BUILD_TESTING)
add_executable(joint_trajectory_csv_test tests/joint_trajectory_csv_test.cpp)
target_include_directories(joint_trajectory_csv_test PRIVATE ${CMAKE_SOURCE_DIR}/cmvr-es)
add_test(NAME joint_trajectory_csv_test COMMAND joint_trajectory_csv_test)
add_executable(aubo_arm_motion_result_test
tests/aubo_arm_motion_result_test.cpp)
target_include_directories(aubo_arm_motion_result_test

View File

@ -28,6 +28,7 @@ public:
std::string& response_json) override;
RobotModel getRobotModel() const override { return model_; }
RobotModel queryRobotModel() const override;
std::size_t getDof() const override { return model_.dof; }
ArmState getRobotState() const override;
JointGroupState getJointState() const override;
@ -94,6 +95,11 @@ public:
Result stopProgram() override;
Result enterTeachingMode() override;
Result startTrajectoryRecording(const std::string& file_name) override;
Result startTrajectoryRecording(const std::string& file_name, double frequency_hz) override;
Result listRecordedTrajectories(std::vector<RecordedTrajectoryInfo>&,
TrajectoryRecordingStatus&) const override;
Result replayRecordedTrajectory(const std::string&, double, bool,
const MotionOptions&) override;
Result completeTeaching() override;
Result stopTrajectoryRecording() override;
Result exitTeachingMode() override;
@ -149,6 +155,9 @@ private:
std::atomic<bool> hardware_estop_latched_{false};
std::atomic<bool> auto_recovery_suppressed_{false};
mutable std::mutex mutex_;
struct CsvRecording;
std::shared_ptr<CsvRecording> csv_recording_;
mutable std::mutex trajectory_mutex_;
#if defined(CMVR_HAS_AUBO_SDK)
std::unique_ptr<SdkState> sdk_;

View File

@ -0,0 +1,124 @@
#pragma once
#include <algorithm>
#include <cmath>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
namespace cmvr::device::aubo_csv {
constexpr std::size_t maxSamples = 180001; // At most 30 minutes at 100 Hz.
inline std::string fileName(std::string name)
{
if (name.empty() || name.size() > 120 || name.front() == '.' ||
name.find("..") != std::string::npos)
throw std::runtime_error("invalid trajectory file name");
for (const unsigned char c : name)
if (c < 32 || std::string("/\\:*?\"<>|").find(c) != std::string::npos)
throw std::runtime_error("trajectory name must not contain a path or reserved characters");
if (name.size() < 4 || name.substr(name.size() - 4) != ".csv") name += ".csv";
return name;
}
inline std::filesystem::path directory(const std::string& device)
{
if (device.empty() || device == "." || device == ".." ||
device.find_first_of("/\\") != std::string::npos)
throw std::runtime_error("invalid device ID for trajectory directory");
return std::filesystem::read_symlink("/proc/self/exe").parent_path() /
"data" / "trajectories" / device;
}
inline std::string columns(const std::vector<std::string>& joints)
{
std::string line = "time_s";
for (const auto& joint : joints) {
if (joint.empty() || joint.find_first_of(",\r\n") != std::string::npos)
throw std::runtime_error("invalid joint name in CSV header");
line += "," + joint + "_rad";
}
return line;
}
struct Trajectory {
std::vector<double> times;
std::vector<std::vector<double>> points;
double frequency{};
};
inline double number(const std::string& s)
{
std::size_t end{};
const double value = std::stod(s, &end);
if (end != s.size() || !std::isfinite(value)) throw std::runtime_error("invalid CSV number");
return value;
}
inline Trajectory load(const std::filesystem::path& path, const std::string& device,
const std::vector<std::string>& joints)
{
if (std::filesystem::is_symlink(path) || !std::filesystem::is_regular_file(path) ||
std::filesystem::file_size(path) > 64 * 1024 * 1024)
throw std::runtime_error("trajectory must be a regular CSV smaller than 64 MB");
std::ifstream in(path);
std::string line;
const auto next = [&]() {
if (!std::getline(in, line)) throw std::runtime_error("incomplete trajectory CSV");
if (!line.empty() && line.back() == '\r') line.pop_back();
};
next();
if (line != "# cmvr_joint_trajectory_v1") throw std::runtime_error("unsupported trajectory CSV version");
next();
if (line != "# device_id=" + device) throw std::runtime_error("trajectory device ID mismatch");
next();
if (line.rfind("# frequency_hz=", 0) != 0) throw std::runtime_error("missing sample frequency");
Trajectory result;
result.frequency = number(line.substr(15));
if (result.frequency < 1 || result.frequency > 100) throw std::runtime_error("invalid sample frequency");
next();
if (line != columns(joints)) throw std::runtime_error("trajectory joint names/order mismatch");
while (std::getline(in, line)) {
if (!line.empty() && line.back() == '\r') line.pop_back();
std::stringstream row(line);
std::string cell;
std::vector<double> values;
while (std::getline(row, cell, ',')) values.push_back(number(cell));
if (line.empty() || line.back() == ',' || values.size() != joints.size() + 1)
throw std::runtime_error("invalid CSV joint count");
const double t = values.front();
if (t < 0 || (result.times.empty() && t != 0) || t > 1800 ||
(!result.times.empty() && (t <= result.times.back() ||
t - result.times.back() > std::max(0.1, 3.0 / result.frequency))))
throw std::runtime_error("non-monotonic time or missing trajectory samples");
result.times.push_back(t);
result.points.emplace_back(values.begin() + 1, values.end());
if (result.times.size() > maxSamples) throw std::runtime_error("trajectory too long");
}
if (in.bad() || result.points.size() < 3 || result.times.back() < 0.02)
throw std::runtime_error("trajectory requires at least 3 valid samples and 20 ms");
return result;
}
// Preserve elapsed controller time, including minor RTDE jitter. Large gaps
// are rejected by load(); never replay sparse points as consecutive 10 ms samples.
inline Trajectory resample(const Trajectory& source, double ratio)
{
if (!std::isfinite(ratio) || ratio < 0.1 || ratio > 1)
throw std::runtime_error("replay speed ratio must be between 0.1 and 1");
Trajectory result;
const double duration = source.times.back();
const std::size_t intervals = static_cast<std::size_t>(std::floor(duration * 100));
const double dt = duration / intervals;
result.frequency = ratio / dt;
std::size_t k = 1;
for (std::size_t i = 0; i <= intervals; ++i) {
const double t = (i == intervals) ? duration : dt * i;
while (k + 1 < source.times.size() && source.times[k] < t) ++k;
const double fraction = std::clamp((t - source.times[k - 1]) /
(source.times[k] - source.times[k - 1]), 0.0, 1.0);
std::vector<double> q(source.points.front().size());
for (std::size_t j = 0; j < q.size(); ++j)
q[j] = source.points[k - 1][j] + fraction * (source.points[k][j] - source.points[k - 1][j]);
result.points.push_back(std::move(q));
result.times.push_back(t / ratio);
}
return result;
}
} // namespace cmvr::device::aubo_csv

View File

@ -666,6 +666,46 @@ ArmState AuboArm::getRobotState() const
return state;
}
RobotModel AuboArm::queryRobotModel() const
{
#if defined(CMVR_HAS_AUBO_SDK)
if (!connected_.load() || !sdk_ || !sdk_->rpc_client) {
throw std::runtime_error("[AuboArm] GetArmInfo failed: robot is not connected");
}
const auto names = sdk_->rpc_client->getRobotNames();
if (names.empty()) {
throw std::runtime_error("[AuboArm] GetArmInfo failed: robot name list is empty");
}
const auto robot = sdk_->rpc_client->getRobotInterface(names.front());
if (!robot) {
throw std::runtime_error("[AuboArm] GetArmInfo failed: robot interface is null");
}
const auto config = robot->getRobotConfig();
const auto type = config->getRobotType();
const auto subtype = config->getRobotSubType();
const int dof = config->getDof();
if (type.empty() || dof <= 0) {
throw std::runtime_error("[AuboArm] GetArmInfo failed: invalid SDK model or dof");
}
// Return a fresh snapshot, without mutating metadata used by motion/state
// threads. Names and default frames are application configuration, not SDK
// readback. In particular, do not enumerate frames with frameGetChildren.
auto result = model_;
result.name = type;
result.description_id = type;
result.subtype = subtype;
result.dof = static_cast<std::size_t>(dof);
if (result.joint_names.size() != result.dof) {
result.joint_names = defaultJointNames(result.dof);
}
result.detected_from_sdk = true;
return result;
#else
throw std::runtime_error("[AuboArm] GetArmInfo requires the AUBO SDK");
#endif
}
JointGroupState AuboArm::getJointState() const
{
JointGroupState state;
@ -838,14 +878,20 @@ Result AuboArm::listBaseFrame(std::vector<std::string>& frame_names) const
#if defined(CMVR_HAS_AUBO_SDK)
try {
const auto robot_names = sdk_->rpc_client->getRobotNames();
// Frame discovery can be slow on older controllers. Keep its longer
// timeout and possible disconnect isolated from state/control RPCs.
arcs::aubo_sdk::RpcClient frame_client;
frame_client.setRequestTimeout(10000);
frame_client.connect(ip_, port_);
frame_client.login(username_, password_);
const auto robot_names = frame_client.getRobotNames();
if (robot_names.empty()) {
return Result::failure(
ArmErrorCode::RobotNotReady,
"[AuboArm] robot name list is empty");
}
const auto robot_interface =
sdk_->rpc_client->getRobotInterface(robot_names.front());
frame_client.getRobotInterface(robot_names.front());
if (!robot_interface || !robot_interface->getSyncMove()) {
return Result::failure(
ArmErrorCode::RobotNotReady,
@ -1737,6 +1783,7 @@ Result AuboArm::connect(const std::string& ip, const int port)
Result AuboArm::disconnect()
{
(void)stopTrajectoryRecording();
#if defined(CMVR_HAS_AUBO_SDK)
if (sdk_) {
sdk_->monitor_running.store(false);
@ -2119,83 +2166,7 @@ Result AuboArm::enterTeachingMode()
Result AuboArm::startTrajectoryRecording(const std::string& file_name)
{
if (file_name.empty()) {
return Result::failure(ArmErrorCode::InvalidArgument,
"trajectory file name must not be empty");
}
const auto ready = ensureConnected_("startTrajectoryRecording");
if (!ready.ok()) {
return ready;
}
#if defined(CMVR_HAS_AUBO_SDK)
try {
const auto robot_names = sdk_->rpc_client->getRobotNames();
if (robot_names.empty()) {
return Result::failure(ArmErrorCode::RobotNotReady,
"[AuboArm] robot name list is empty");
}
const auto robot_interface =
sdk_->rpc_client->getRobotInterface(robot_names.front());
if (!robot_interface || !robot_interface->getRobotManage()) {
return Result::failure(ArmErrorCode::RobotNotReady,
"[AuboArm] robot manage interface is unavailable");
}
const int ret =
robot_interface->getRobotManage()->startRecord(file_name);
if (ret != arcs::common_interface::AUBO_OK) {
return Result::failure(
ArmErrorCode::CommandFailed,
"[AuboArm] startRecord failed: sdk ret=" +
std::to_string(ret));
}
return Result::success();
} catch (const std::exception& e) {
return Result::failure(
ArmErrorCode::CommandFailed,
std::string("[AuboArm] startTrajectoryRecording failed: ") +
e.what());
}
#else
return unsupported_("startTrajectoryRecording");
#endif
}
Result AuboArm::stopTrajectoryRecording()
{
const auto ready = ensureConnected_("stopTrajectoryRecording");
if (!ready.ok()) {
return ready;
}
#if defined(CMVR_HAS_AUBO_SDK)
try {
const auto robot_names = sdk_->rpc_client->getRobotNames();
if (robot_names.empty()) {
return Result::failure(ArmErrorCode::RobotNotReady,
"[AuboArm] robot name list is empty");
}
const auto robot_interface =
sdk_->rpc_client->getRobotInterface(robot_names.front());
if (!robot_interface || !robot_interface->getRobotManage()) {
return Result::failure(ArmErrorCode::RobotNotReady,
"[AuboArm] robot manage interface is unavailable");
}
const int ret = robot_interface->getRobotManage()->stopRecord();
if (ret != arcs::common_interface::AUBO_OK) {
return Result::failure(
ArmErrorCode::CommandFailed,
"[AuboArm] stopRecord failed: sdk ret=" +
std::to_string(ret));
}
return Result::success();
} catch (const std::exception& e) {
return Result::failure(
ArmErrorCode::CommandFailed,
std::string("[AuboArm] stopTrajectoryRecording failed: ") +
e.what());
}
#else
return unsupported_("stopTrajectoryRecording");
#endif
return startTrajectoryRecording(file_name, 100);
}
Result AuboArm::exitTeachingMode()

View File

@ -0,0 +1,357 @@
#include "devices/arm/aubo_arm/include/aubo_arm.h"
#include "devices/arm/aubo_arm/include/joint_trajectory_csv.h"
#include "algorithms/smoother/bspline/include/bspline_smoother.h"
#include <chrono>
#include <iomanip>
#include <fcntl.h>
#include <unistd.h>
#if defined(CMVR_HAS_AUBO_SDK)
#include "aubo_sdk/rpc.h"
#include "aubo_sdk/rtde.h"
#endif
namespace cmvr::device {
namespace {
Result csvError(const std::exception& e)
{
return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm CSV] ") + e.what());
}
void require(bool condition, const std::string& error)
{
if (!condition) throw std::runtime_error(error);
}
}
struct AuboArm::CsvRecording {
std::mutex mutex;
std::condition_variable changed;
std::ofstream output;
std::filesystem::path path;
std::string file_name, error;
std::size_t samples{}, dof{};
double first_time{}, last_time{}, frequency{};
std::chrono::steady_clock::time_point last_received{};
bool active{};
#if defined(CMVR_HAS_AUBO_SDK)
std::shared_ptr<arcs::aubo_sdk::RtdeClient> rtde;
int topic{-1};
#endif
};
Result AuboArm::startTrajectoryRecording(const std::string& name, double hz)
{
const auto ready = ensureConnected_("startTrajectoryRecording");
if (!ready.ok()) return ready;
std::lock_guard<std::mutex> guard(trajectory_mutex_);
#if defined(CMVR_HAS_AUBO_SDK)
auto session = std::make_shared<CsvRecording>();
try {
require(!busy(), "arm motion is active");
require(!csv_recording_, "stop the previous recording before starting another");
hz = hz == 0 ? 100 : hz;
require(std::isfinite(hz) && hz >= 1 && hz <= 100, "sample frequency must be 1~100 Hz");
session->file_name = aubo_csv::fileName(name);
session->frequency = hz;
session->dof = model_.dof;
const auto dir = aubo_csv::directory(id_);
std::filesystem::create_directories(dir);
const auto final_path = dir / session->file_name;
require(!std::filesystem::exists(final_path), "CSV already exists; choose another name");
session->path = final_path.string() + ".partial";
// Exclusive creation prevents accidental overwrites, including partial files.
const int fd = ::open(session->path.c_str(), O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0644);
require(fd >= 0, "cannot create CSV; a partial file may already exist");
::close(fd);
session->output.open(session->path);
require(session->output.good(), "cannot open CSV for writing");
session->output << std::setprecision(17) << "# cmvr_joint_trajectory_v1\n# device_id=" << id_
<< "\n# frequency_hz=" << hz << '\n' << aubo_csv::columns(model_.joint_names) << '\n';
session->rtde = std::make_shared<arcs::aubo_sdk::RtdeClient>();
require(session->rtde->connect(ip_, 30010) == 0, "RTDE connection failed (port 30010)");
require(session->rtde->login(username_, password_) == 0, "RTDE login failed");
session->topic = session->rtde->setTopic(false, {"timestamp", "R1_actual_q"}, hz, 0);
require(session->topic >= 0, "RTDE joint subscription is unsupported");
session->active = true;
require(session->rtde->subscribe(session->topic, [session](arcs::aubo_sdk::InputParser& parser) {
std::lock_guard<std::mutex> lock(session->mutex);
if (!session->active) return;
try {
const double now = parser.popDouble();
const auto q = parser.popVectorDouble();
require(std::isfinite(now) && q.size() == session->dof, "invalid RTDE joint sample");
for (double value : q) require(std::isfinite(value), "non-finite RTDE joint position");
if (session->samples == 0) session->first_time = now;
else require(now > session->last_time &&
now - session->last_time <= std::max(0.1, 3.0 / session->frequency),
"RTDE timestamp reset or missing samples; recording stopped");
require(now - session->first_time <= 1800 && session->samples < aubo_csv::maxSamples,
"recording reached 30 minute limit; stop to save");
session->output << now - session->first_time;
for (double value : q) session->output << ',' << value;
session->output << '\n';
require(session->output.good(), "CSV write failed (disk full or storage error)");
session->last_time = now;
session->last_received = std::chrono::steady_clock::now();
++session->samples;
} catch (const std::exception& e) {
session->error = e.what();
session->active = false;
}
session->changed.notify_all();
}) == 0, "RTDE subscribe failed");
csv_recording_ = session;
std::unique_lock<std::mutex> lock(session->mutex);
require(session->changed.wait_for(lock, std::chrono::seconds(3), [&] {
return session->samples > 0 || !session->error.empty(); }), "no RTDE samples received");
require(session->error.empty(), session->error);
return Result::success();
} catch (const std::exception& e) {
{ std::lock_guard<std::mutex> lock(session->mutex); session->active = false; }
if (session->rtde) { try { session->rtde->disconnect(); } catch (...) {} }
session->rtde.reset();
session->output.close();
if (csv_recording_ == session) csv_recording_.reset();
// Failed recordings remain .partial for diagnosis; never offered for playback.
return csvError(e);
}
#else
(void)name; (void)hz;
return unsupported_("CSV recording");
#endif
}
Result AuboArm::stopTrajectoryRecording()
{
std::lock_guard<std::mutex> guard(trajectory_mutex_);
auto session = csv_recording_;
if (!session) return Result::success();
{ std::lock_guard<std::mutex> lock(session->mutex);
if (session->samples && std::chrono::duration<double>(std::chrono::steady_clock::now() -
session->last_received).count() > std::max(1.0, 3.0 / session->frequency))
session->error = "RTDE feedback lost; incomplete recording retained as .partial";
session->active = false; }
#if defined(CMVR_HAS_AUBO_SDK)
try {
if (session->rtde) session->rtde->disconnect();
} catch (const std::exception& e) {
std::lock_guard<std::mutex> lock(session->mutex);
session->error = e.what();
}
session->rtde.reset(); // disconnect releases the subscription callback.
#endif
std::lock_guard<std::mutex> lock(session->mutex);
csv_recording_.reset();
try {
session->output.flush();
const bool written = session->output.good();
session->output.close();
require(written && !session->output.fail(), "CSV flush/close failed");
require(session->error.empty(), session->error);
(void)aubo_csv::load(session->path, id_, model_.joint_names);
const auto final_path = session->path.parent_path() / session->file_name;
// Atomic publication without overwriting an existing saved trajectory.
require(::link(session->path.c_str(), final_path.c_str()) == 0, "cannot publish CSV (name exists?)");
std::filesystem::remove(session->path);
return Result::success();
} catch (const std::exception& e) {
return csvError(e);
}
}
Result AuboArm::listRecordedTrajectories(std::vector<RecordedTrajectoryInfo>& files,
TrajectoryRecordingStatus& status) const
{
std::lock_guard<std::mutex> guard(trajectory_mutex_);
try {
files.clear();
status = {};
const auto dir = aubo_csv::directory(id_);
status.directory = dir.string();
if (csv_recording_) {
std::lock_guard<std::mutex> lock(csv_recording_->mutex);
if (csv_recording_->active && csv_recording_->samples &&
std::chrono::duration<double>(std::chrono::steady_clock::now() -
csv_recording_->last_received).count() > std::max(1.0, 3.0 / csv_recording_->frequency)) {
csv_recording_->error = "RTDE feedback lost; stop recording to close the partial file";
csv_recording_->active = false;
}
status.recording = csv_recording_->active;
status.samples = csv_recording_->samples;
status.file_name = csv_recording_->file_name;
status.error = csv_recording_->error;
}
if (std::filesystem::exists(dir)) for (const auto& entry : std::filesystem::directory_iterator(dir)) {
if (entry.path().extension() != ".csv" || entry.is_symlink()) continue;
try {
const auto trajectory = aubo_csv::load(entry.path(), id_, model_.joint_names);
files.push_back({entry.path().filename().string(), trajectory.points.size(),
trajectory.times.back(), trajectory.frequency});
} catch (...) { /* Incomplete/foreign files are not replay candidates. */ }
}
std::sort(files.begin(), files.end(), [](const auto& a, const auto& b) { return a.file_name < b.file_name; });
return Result::success();
} catch (const std::exception& e) { return csvError(e); }
}
Result AuboArm::replayRecordedTrajectory(const std::string& name, double ratio, bool to_start,
const MotionOptions& options)
{
const auto ready = ensureMotionReady_("replayRecordedTrajectory");
if (!ready.ok()) return ready;
#if defined(CMVR_HAS_AUBO_SDK)
std::uint64_t token{};
if (!tryBeginMotion_(ActiveMotion::Joint, token))
return Result::failure(ArmErrorCode::RobotNotReady, "arm is busy");
std::shared_ptr<arcs::aubo_sdk::RpcClient> rpc;
arcs::aubo_sdk::RobotInterfacePtr robot;
std::string buffer;
bool submitted = false;
Result result = Result::success();
try {
aubo_csv::Trajectory source;
{
std::lock_guard<std::mutex> guard(trajectory_mutex_);
require(!csv_recording_, "stop recording before replay");
source = aubo_csv::load(aubo_csv::directory(id_) / aubo_csv::fileName(name), id_, model_.joint_names);
}
ratio = ratio == 0 ? 1 : ratio;
require(std::isfinite(ratio) && ratio >= 0.1 && ratio <= 1, "speed ratio must be 0.1~1");
auto trajectory = source;
rpc = std::make_shared<arcs::aubo_sdk::RpcClient>();
rpc->setRequestTimeout(2000);
require(rpc->connect(ip_, port_) == 0, "replay RPC connection failed");
require(rpc->login(username_, password_) == 0, "replay RPC login failed");
const auto names = rpc->getRobotNames();
require(!names.empty(), "robot name unavailable");
robot = rpc->getRobotInterface(names.front());
const auto check = [&] {
require(!motionCanceled_(token) && !(options.cancellation_requested && options.cancellation_requested()),
"trajectory operation canceled");
require(robot->getRobotState()->getRobotModeType() == arcs::common_interface::RobotModeType::Running,
"robot must be enabled and out of teaching mode");
const auto safety = robot->getRobotState()->getSafetyModeType();
require(safety == arcs::common_interface::SafetyModeType::Normal ||
safety == arcs::common_interface::SafetyModeType::ReducedMode, "robot safety state does not allow replay");
};
check();
const auto lower = robot->getRobotConfig()->getJointMinPositions();
const auto upper = robot->getRobotConfig()->getJointMaxPositions();
require(lower.size() == model_.dof && upper.size() == model_.dof, "joint limits unavailable");
for (const auto& q : trajectory.points) for (std::size_t j = 0; j < q.size(); ++j)
require(std::isfinite(lower[j]) && std::isfinite(upper[j]) && lower[j] < upper[j] &&
q[j] >= lower[j] && q[j] <= upper[j], "trajectory exceeds controller joint limits");
auto motion = robot->getMotionControl();
if (!to_start) {
MotionOptions limits = options;
const auto vmax = robot->getRobotConfig()->getJointMaxSpeeds();
const auto amax = robot->getRobotConfig()->getJointMaxAccelerations();
require(vmax.size() == model_.dof && amax.size() == model_.dof, "controller motion limits unavailable");
require(std::isfinite(limits.velocity) && limits.velocity > 0 &&
std::isfinite(limits.acceleration) && limits.acceleration > 0 &&
std::isfinite(limits.jerk) && limits.jerk > 0, "invalid smoothing limits");
limits.joint_velocity_limits = vmax;
for (double a : amax) {
require(std::isfinite(a) && a > 0, "invalid controller acceleration limit");
limits.acceleration = std::min(limits.acceleration, a);
}
limits.cancellation_requested = [&, external = options.cancellation_requested] {
return motionCanceled_(token) || (external && external());
};
BSplineSmoother smoother(0.05);
JointTrajectory smoothed;
require(smoother.init() && smoother.smooth(source.points, limits, 0.01, smoothed),
"BSplineSmoother planning failed or canceled");
require(smoothed.size() >= 2 && smoothed.back().time_s <= 1800,
"smoothed trajectory exceeds the 30 minute planning limit");
aubo_csv::Trajectory timed;
timed.frequency = 100;
// Never shorten the overall recorded duration. Slowing time also
// decreases velocity, acceleration and jerk; no extra speed-up.
for (const auto& point : smoothed) {
timed.times.push_back(point.time_s);
timed.points.push_back(point.position);
}
// A stationary spline may only contain its two endpoint samples.
// Retain a valid constant path rather than inventing any motion.
if (timed.times.back() < 0.02) {
const auto last = timed.points.back();
timed.times = {0.0, 0.01, 0.02};
timed.points = {timed.points.front(), last, last};
}
const double stretch = std::max(1.0, source.times.back() / timed.times.back());
trajectory = aubo_csv::resample(timed, 1.0);
trajectory.frequency /= stretch / ratio;
for (auto& t : trajectory.times) t *= stretch / ratio;
// The B-spline may round corners: recheck generated positions, not
// merely the source samples. SDK evaluates the final path too.
for (const auto& q : trajectory.points) for (std::size_t j = 0; j < q.size(); ++j)
require(q[j] >= lower[j] && q[j] <= upper[j], "smoothed trajectory exceeds joint limits");
}
const auto near = [&](const std::vector<double>& target) {
const auto q = robot->getRobotState()->getJointPositions();
if (q.size() != target.size()) return false;
for (std::size_t j = 0; j < q.size(); ++j)
if (!std::isfinite(q[j]) || std::abs(q[j] - target[j]) > 0.01) return false;
return true;
};
double expected_duration = 120;
if (to_start) {
check();
submitted = true;
require(motion->moveJoint(trajectory.points.front(), 0.1, 0.1, 0, 0) == 0, "move to start rejected");
} else {
require(near(trajectory.points.front()), "not at trajectory start; use MoveToTrajectoryStart first");
// A unique, service-owned buffer never overwrites a user SDK buffer.
buffer = "cmvr_csv_" + std::to_string(::getpid()) + "_" + std::to_string(token);
require(motion->pathBufferAlloc(buffer, 2, static_cast<int>(trajectory.points.size())) == 0,
"pathBufferAlloc failed");
for (std::size_t begin = 0; begin < trajectory.points.size(); begin += 100) {
check();
const auto end = std::min(begin + 100, trajectory.points.size());
require(motion->pathBufferAppend(buffer, {trajectory.points.begin() + begin,
trajectory.points.begin() + end}) == 0, "pathBufferAppend failed");
}
require(motion->pathBufferEval(buffer, {}, {}, 1.0 / trajectory.frequency) == 0, "pathBufferEval failed");
const auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(30);
while (!motion->pathBufferValid(buffer)) {
check();
require(std::chrono::steady_clock::now() < deadline, "path evaluation timed out");
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
check();
require(near(trajectory.points.front()), "robot moved away from trajectory start");
submitted = true;
require(motion->movePathBuffer(buffer) == 0, "movePathBuffer rejected");
expected_duration = trajectory.times.back() + 30;
}
const auto started = std::chrono::steady_clock::now();
bool observed_motion = false;
while (true) {
check();
const int exec = motion->getExecId();
observed_motion = observed_motion || exec >= 0;
const double elapsed = std::chrono::duration<double>(std::chrono::steady_clock::now() - started).count();
const auto& target = to_start ? trajectory.points.front() : trajectory.points.back();
if (exec < 0 && (observed_motion || elapsed >= (to_start ? 1.0 : trajectory.times.back())) && near(target)) break;
require(elapsed < expected_duration, "trajectory motion did not complete within deadline");
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
} catch (const std::exception& e) {
result = csvError(e);
if (submitted && robot) {
try { (void)robot->getMotionControl()->stopJoint(2.0); } catch (...) {}
}
}
if (robot && !buffer.empty()) {
try { (void)robot->getMotionControl()->pathBufferFree(buffer); } catch (...) {}
}
if (rpc) { try { rpc->logout(); rpc->disconnect(); } catch (...) {} }
releaseMotion_(ActiveMotion::Joint, token);
return result;
#else
(void)name; (void)ratio; (void)to_start; (void)options;
return unsupported_("CSV replay");
#endif
}
} // namespace cmvr::device

View File

@ -0,0 +1,43 @@
#include "devices/arm/aubo_arm/include/joint_trajectory_csv.h"
#ifdef NDEBUG
#undef NDEBUG
#endif
#include <cassert>
#include <unistd.h>
using namespace cmvr::device::aubo_csv;
int main()
{
const auto path = std::filesystem::temp_directory_path() / ("cmvr_csv_test_" + std::to_string(getpid()));
const std::vector<std::string> joints{"joint_1", "joint_2"};
const auto write = [&](const std::string& rows) {
std::ofstream out(path);
out << "# cmvr_joint_trajectory_v1\n# device_id=arm\n# frequency_hz=100\n"
<< columns(joints) << '\n' << rows;
};
const auto rejects = [&](const std::string& rows) {
write(rows);
bool failed = false;
try { (void)load(path, "arm", joints); } catch (...) { failed = true; }
assert(failed);
};
write("0,0,1\n0.009,0.9,1\n0.021,2.1,1\n0.03,3,1\n");
const auto raw = load(path, "arm", joints);
const auto slow = resample(raw, 0.5);
assert(slow.points.size() == 4);
assert(std::abs(slow.points[1][0] - 1) < 1e-9);
assert(std::abs(slow.times.back() - 0.06) < 1e-9);
assert(slow.points.front() == raw.points.front() && slow.points.back() == raw.points.back());
bool badName = false;
try { fileName("../other.csv"); } catch (...) { badName = true; }
assert(badName && fileName("test") == "test.csv");
rejects("0,0,1\n0.01,nan,1\n0.02,2,1\n");
rejects("0,0,1\n0.01,1,1\n0.01,2,1\n");
rejects("0,0,1\n0.01,1,1\n0.5,2,1\n");
rejects("0,0,1\n0.01,1,1\n");
rejects("0,0,1\n0.01,1\n0.02,2,1\n");
write("0,0,1\n0.01,1,1\n0.02,2,1\n");
bool mismatch = false;
try { load(path, "another_arm", joints); } catch (...) { mismatch = true; }
assert(mismatch);
std::filesystem::remove(path);
}

View File

@ -13,6 +13,18 @@
namespace cmvr::device {
struct RecordedTrajectoryInfo {
std::string file_name;
std::size_t samples{};
double duration_s{};
double sampling_frequency_hz{};
};
struct TrajectoryRecordingStatus {
std::string directory, file_name, error;
bool recording{};
std::size_t samples{};
};
class RobotArm : public AbstractDevice {
public:
~RobotArm() override = default;
@ -20,6 +32,7 @@ public:
DeviceKind kind() const noexcept override { return DeviceKind::Arm; }
virtual RobotModel getRobotModel() const = 0;
virtual RobotModel queryRobotModel() const { return getRobotModel(); }
virtual std::size_t getDof() const = 0;
virtual ArmState getRobotState() const = 0;
virtual JointGroupState getJointState() const = 0;
@ -171,6 +184,22 @@ public:
virtual Result completeTeaching() {
return Result::failure(ArmErrorCode::UnsupportedCommand, "complete teaching is not supported by this robot arm");
}
virtual Result startTrajectoryRecording(const std::string& name, double frequency_hz)
{
if (frequency_hz == 0 || frequency_hz == 100)
return startTrajectoryRecording(name);
return Result::failure(ArmErrorCode::UnsupportedCommand, "configurable CSV recording unsupported");
}
virtual Result listRecordedTrajectories(std::vector<RecordedTrajectoryInfo>&,
TrajectoryRecordingStatus&) const
{
return Result::failure(ArmErrorCode::UnsupportedCommand, "CSV trajectories unsupported");
}
virtual Result replayRecordedTrajectory(const std::string&, double, bool,
const MotionOptions&)
{
return Result::failure(ArmErrorCode::UnsupportedCommand, "CSV replay unsupported");
}
virtual Result stopTrajectoryRecording() {
return Result::failure(ArmErrorCode::UnsupportedCommand, "trajectory recording is not supported by this robot arm");
}

View File

@ -91,6 +91,14 @@ public:
api::CommandHeader_Feedback* response) override;
private:
grpc::Status ListRecordedTrajectories(grpc::ServerContext*,
const api::ListRecordedTrajectories_Request*, api::ListRecordedTrajectories_Response*) override;
grpc::Status MoveToTrajectoryStart(grpc::ServerContext*,
const api::ReplayRecordedTrajectory_Request*, api::ReplayRecordedTrajectory_Response*) override;
grpc::Status ReplayRecordedTrajectory(grpc::ServerContext*,
const api::ReplayRecordedTrajectory_Request*, api::ReplayRecordedTrajectory_Response*) override;
grpc::Status replayTrajectory(grpc::ServerContext*, const api::ReplayRecordedTrajectory_Request*,
api::ReplayRecordedTrajectory_Response*, bool to_start);
device::DeviceManager& dmgr_;
};

View File

@ -562,7 +562,7 @@ grpc::Status gRPCArmServiceImpl::GetArmInfo(grpc::ServerContext*,
if (!arm) {
return setDeviceNotFound(response, device_id);
}
const auto model = arm->getRobotModel();
const auto model = arm->queryRobotModel();
response->set_device_id(device_id);
response->set_manufacturer(model.manufacturer);
response->set_model(model.name);
@ -772,7 +772,7 @@ grpc::Status gRPCArmServiceImpl::StartTrajectoryRecording(
const std::string device_id = request->header().device_id();
auto arm = dmgr_.getDevice<device::RobotArm>(device_id);
if (!arm) return setDeviceNotFound(response, device_id);
const auto result = arm->startTrajectoryRecording(request->file_name());
const auto result = arm->startTrajectoryRecording(request->file_name(), request->sampling_frequency_hz());
if (result.ok()) logRpcSuccess("StartTrajectoryRecording", device_id);
return setResponseResult(response, result);
} catch (const std::exception& e) {
@ -844,4 +844,68 @@ grpc::Status gRPCArmServiceImpl::ExitTeachingMode(
}
}
grpc::Status gRPCArmServiceImpl::ListRecordedTrajectories(grpc::ServerContext*,
const api::ListRecordedTrajectories_Request* request, api::ListRecordedTrajectories_Response* response)
{
try {
const auto& id = request->header().device_id();
auto arm = dmgr_.getDevice<device::RobotArm>(id);
if (!arm) return setDeviceNotFound(response, id);
std::vector<device::RecordedTrajectoryInfo> files;
device::TrajectoryRecordingStatus state;
const auto result = arm->listRecordedTrajectories(files, state);
for (const auto& file : files) {
auto* item = response->add_trajectories();
item->set_file_name(file.file_name);
item->set_samples(file.samples);
item->set_duration_s(file.duration_s);
item->set_sampling_frequency_hz(file.sampling_frequency_hz);
}
response->set_directory(state.directory);
response->set_recording(state.recording);
response->set_recording_file(state.file_name);
response->set_recorded_samples(state.samples);
response->set_recording_error(state.error);
return setResponseResult(response, result);
} catch (const std::exception& e) {
fillFeedback(response->mutable_header(), false, e.what());
return grpc::Status(grpc::StatusCode::INTERNAL, e.what());
}
}
grpc::Status gRPCArmServiceImpl::MoveToTrajectoryStart(grpc::ServerContext* context,
const api::ReplayRecordedTrajectory_Request* request, api::ReplayRecordedTrajectory_Response* response)
{
return replayTrajectory(context, request, response, true);
}
grpc::Status gRPCArmServiceImpl::ReplayRecordedTrajectory(grpc::ServerContext* context,
const api::ReplayRecordedTrajectory_Request* request, api::ReplayRecordedTrajectory_Response* response)
{
return replayTrajectory(context, request, response, false);
}
grpc::Status gRPCArmServiceImpl::replayTrajectory(grpc::ServerContext* context,
const api::ReplayRecordedTrajectory_Request* request, api::ReplayRecordedTrajectory_Response* response, bool to_start)
{
auto control_lease = ControlCommandArbiter::instance().tryAcquireControl();
if (!control_lease) return setControlBusy(response);
try {
const auto& id = request->header().device_id();
auto arm = dmgr_.getDevice<device::RobotArm>(id);
if (!arm) return setDeviceNotFound(response, id);
device::MotionOptions limits;
limits.velocity = request->max_velocity() == 0 ? 0.3 : request->max_velocity();
limits.acceleration = request->max_acceleration() == 0 ? 0.5 : request->max_acceleration();
limits.jerk = request->max_jerk() == 0 ? 2.0 : request->max_jerk();
limits.cancellation_requested = [context] { return context->IsCancelled(); };
const auto result = arm->replayRecordedTrajectory(request->file_name(), request->speed_ratio(), to_start, limits);
if (result.ok()) logRpcSuccess(to_start ? "MoveToTrajectoryStart" : "ReplayRecordedTrajectory", id);
return setResponseResult(response, result);
} catch (const std::exception& e) {
fillFeedback(response->mutable_header(), false, e.what());
return grpc::Status(grpc::StatusCode::INTERNAL, e.what());
}
}
} // namespace cmvr::service

View File

@ -0,0 +1 @@
0.27.1-rc.4+b46f170

Binary file not shown.

View File

@ -196,10 +196,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"getRobotNames","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":["rob1"]}
* @endcode
* \endchinese
*
* \english
@ -217,10 +221,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"getRobotNames","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":["rob1"]}
* @endcode
* \endenglish
*/
std::vector<std::string> getRobotNames();
@ -302,7 +310,6 @@ public:
*
* @par Python函数原型
* getSocket(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Socket
* @endcode
*
* @par C++示例
* @code
@ -317,7 +324,6 @@ public:
*
* @par Python function prototype
* getSocket(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Socket
* @endcode
*
* @par C++ example
* @code

View File

@ -60,7 +60,10 @@
_D(JOINT_ERR_BOOTLOADER, 10041, "joint" _PH1_ " error: The joint is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(JOINT_ERR_SLAVE_OFFLINE, 10042, "slave joint" _PH1_ " error: slave joint may be offline", "(a) Check slave joint's hardware. (b) Check slave joint's id.") \
_D(JOINT_ERR_SLAVE_BOOTLOADER, 10043, "slave joint" _PH1_ " error: The slave joint is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(JOINT_ERR_ETHERCAT_BUS, 10044, "joint" _PH1_ " error: ETHERCAT bus error", "suggest...")
_D(JOINT_ERR_ETHERCAT_BUS, 10044, "joint" _PH1_ " error: ETHERCAT bus error", "suggest...") \
_D(JOINT_ERR_TORQUE_SENSOR_UNCALIB, 10045, "joint" _PH1_ " torque sensor uncalibrated", "suggest...") \
_D(JOINT_ERR_APP_FAULT, 10046, "joint" _PH1_ " APP is corrupted. Maybe reason: (a) in boot mode not have app. (b) app size is over limit. (c) app crc is error", "please update app firmware") \
_D(JOINT_ERR_SLAVE_APP_FAULT, 10047, "slave joint" _PH1_ " APP is corrupted. Maybe reason: (a) in boot mode not have app. (b) app size is over limit. (c) app crc is error", "please update app firmware")
// Joint extended error codes (ex_err_code), starting from 10401
#define JOINT_EX_ERRORS \
@ -152,6 +155,16 @@
_D(EX_JOINT_EC_TASK_STACK_SHORTAGE, 10486, "joint" _PH1_ " error: task stack insufficient", "suggest...", 0xFF04) \
_D(EX_JOINT_EC_TASK_STACK_OVERFLOW, 10487, "joint" _PH1_ " error: task stack overflow", "suggest...", 0xFF05) \
_D(EX_JOINT_EC_SERVO_STEP, 10488, "joint" _PH1_ " servo process step", "For information only. No action required.", 0x6105) \
_D(EX_JOINT_EC_MOTOR_ABS_ENC_ERR, 10489, "joint" _PH1_ " error: motor-side absolute encoder fault", "suggest...", 0x5207) \
_D(EX_JOINT_EC_MU_SAVE_WARNING, 10490, "joint" _PH1_ " error: multi-turn data warning", "suggest...", 0x6104) \
_D(EX_JOINT_EC_DATA_MIGRATE, 10491, "joint" _PH1_ " error: data migration failed", "suggest...", 0x6106) \
_D(EX_JOINT_EC_ZERO_CALI_FAILED, 10492, "joint" _PH1_ " error: zero calibration failed", "suggest...", 0x700D) \
_D(EX_JOINT_EC_TORQUE_STATIC_DIR_FAIL, 10493, "joint" _PH1_ " error: torque static direction check failed", "suggest...", 0x8027) \
_D(EX_JOINT_EC_TORQUE_STATIC_VALUE_FAIL, 10494, "joint" _PH1_ " error: torque static value check failed", "suggest...", 0x8028) \
_D(EX_JOINT_EC_TORQUE_DYNAMIC_DIR_FAIL, 10495, "joint" _PH1_ " error: torque dynamic direction check failed", "suggest...", 0x8029) \
_D(EX_JOINT_EC_TORQUE_SENSOR_STUCK, 10496, "joint" _PH1_ " error: torque sensor stuck", "suggest...", 0x802A) \
_D(EX_JOINT_EC_TORQUE_SENSOR_JUMP, 10497, "joint" _PH1_ " error: torque sensor jump", "suggest...", 0x802B) \
_D(EX_JOINT_EC_TORQUE_CONFIG_INVALID, 10498, "joint" _PH1_ " error: torque configuration invalid", "suggest...", 0x802C) \
_D(EX_JOINT_EC_UNKNOWN, 10800, "joint" _PH1_ " error: unknown error", "suggest...", 0xFFFF)
#define EXT_AXIS_ERRORS \
@ -244,11 +257,11 @@
_D(TOOL_ERR_BOOTLOADER, 40034, "tool error: The tool is in bootloader mode. Retry firmware update. ", "suggest...")
#define EX_TOOL_ERRORS \
_D(EX_TOOL_EC_LOW_VOLTAGE, 40101, "tool error: low voltage", "check tool power supply voltage") \
_D(EX_TOOL_EC_FORCESENSOR_COMM, 40102, "tool error: external force sensor communication error", "check external force sensor communication connection") \
_D(EX_TOOL_485_SENDFULL_COMM, 40103, "tool error: 485 transparent transmission buffer full", "check 485 communication load and transmission frequency") \
_D(EX_TOOL_FORCESENSOR_FILTER_ZERO, 40104, "tool error: force sensor filter parameter is zero", "check force sensor filter parameter configuration") \
_D(EX_TOOL_EC_UNKNOWN, 40200, "tool error: unknown error", "check controller logs and hardware status")
_D(EX_TOOL_EC_LOW_VOLTAGE, 40101, "tool error: low voltage", "check tool power supply voltage", 0x2000) \
_D(EX_TOOL_EC_FORCESENSOR_COMM, 40102, "tool error: external force sensor communication error", "check external force sensor communication connection", 0x3000) \
_D(EX_TOOL_485_SENDFULL_COMM, 40103, "tool error: 485 transparent transmission buffer full", "check 485 communication load and transmission frequency", 0x3001) \
_D(EX_TOOL_FORCESENSOR_FILTER_ZERO, 40104, "tool error: force sensor filter parameter is zero", "check force sensor filter parameter configuration", 0x3002) \
_D(EX_TOOL_EC_UNKNOWN, 40200, "tool error: unknown error", "check controller logs and hardware status", 0xFFFF)
#define PEDSTRAL_ERRORS \
_D(PKG_LOST, 50001, "Lost package from pedestal", "suggest...") \
@ -256,15 +269,15 @@
_D(PEDESTAL_ERR_BOOTLOADER, 50003, "pedestal error: The pedestal is in bootloader mode. Retry firmware update. ", "suggest...")
#define EX_PEDSTRAL_ERRORS \
_D(EX_BASE_EC_LOW_VOLTAGE, 50101, "pedstral error: low voltage", "check power supply voltage and battery status") \
_D(EX_BASE_EC_OVER_TEMPERATURE_RES, 50102, "pedstral error: resistor over temperature", "check braking resistor temperature and cooling condition") \
_D(EX_BASE_EC_OVER_TARGET_BRAKE_OPEN_VOLT, 50103, "pedstral error: input voltage close to or exceeds regenerative brake activation voltage", "check input power voltage and regenerative braking configuration") \
_D(EX_BASE_EC_RES_BREAKAGE, 50104, "pedstral error: brake resistor breakage", "check whether the brake resistor is disconnected or damaged") \
_D(EX_BASE_EC_IMU_CALIBRATE, 50105, "pedstral error: IMU calibration required", "perform IMU calibration according to maintenance procedure") \
_D(EX_BASE_EC_TEMP_SENSOR_SHORT, 50106, "pedstral error: temperature sensor short circuit", "check temperature sensor wiring and solder joints for short circuit") \
_D(EX_BASE_EC_TEMP_SENSOR_BREAK, 50107, "pedstral error: temperature sensor open circuit", "check temperature sensor connection and cable continuity") \
_D(EX_BASE_EC_96V_INSTANT_OVER_VOLTAGE, 50108, "pedstral error: 96V instantaneous over voltage after regenerative braking", "check regenerative braking behavior and power bus voltage") \
_D(EX_BASE_EC_UNKNOWN, 50200, "pedstral error: unknown error", "check controller logs and hardware status")
_D(EX_BASE_EC_LOW_VOLTAGE, 50101, "pedstral error: low voltage", "check power supply voltage and battery status", 0x2000) \
_D(EX_BASE_EC_OVER_TEMPERATURE_RES, 50102, "pedstral error: resistor over temperature", "check braking resistor temperature and cooling condition", 0x2001) \
_D(EX_BASE_EC_OVER_TARGET_BRAKE_OPEN_VOLT, 50103, "pedstral error: input voltage close to or exceeds regenerative brake activation voltage", "check input power voltage and regenerative braking configuration", 0x2002) \
_D(EX_BASE_EC_RES_BREAKAGE, 50104, "pedstral error: brake resistor breakage", "check whether the brake resistor is disconnected or damaged", 0x2003) \
_D(EX_BASE_EC_IMU_CALIBRATE, 50105, "pedstral error: IMU calibration required", "perform IMU calibration according to maintenance procedure", 0x2004) \
_D(EX_BASE_EC_TEMP_SENSOR_SHORT, 50106, "pedstral error: temperature sensor short circuit", "check temperature sensor wiring and solder joints for short circuit", 0x2005) \
_D(EX_BASE_EC_TEMP_SENSOR_BREAK, 50107, "pedstral error: temperature sensor open circuit", "check temperature sensor connection and cable continuity", 0x2006) \
_D(EX_BASE_EC_96V_INSTANT_OVER_VOLTAGE, 50108, "pedstral error: 96V instantaneous over voltage after regenerative braking", "check regenerative braking behavior and power bus voltage", 0x2007) \
_D(EX_BASE_EC_UNKNOWN, 50200, "pedstral error: unknown error", "check controller logs and hardware status", 0xFFFF)
#define SAFETY_INTERFACE_BOARD_ERRORS \
_D(IFB_ERR_ROBOTTYPE, 20001, "Robot error type!", "suggest...") \
@ -296,7 +309,15 @@
_D(HANDLE_ERR_BOOTLOADER, 20027, "handle error: The handle is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(IFB_POWERLOSS_OFFLINE, 20028, "interface powerloss board error: interface powerloss board may be offline", "(a) Check interface powerloss board's hardware. (b) Check interface powerloss board's id.") \
_D(IFB_POWERLOSS_ERR_BOOTLOADER, 20029, "interface powerloss board error: The interface powerloss board is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(HANDLE_COMM_ERROR, 20030, "handle error: handle comm error", "(a) Check handle's hardware. (b) Check handle's id.")
_D(HANDLE_COMM_ERROR, 20030, "handle error: handle comm error", "(a) Check handle's hardware. (b) Check handle's id.") \
_D(IFACE_ERR_ETHERCAT_BUS, 20031, "iface error: ETHERCAT bus error", "suggest...") \
_D(BASE_ERR_ETHERCAT_BUS, 20032, "base error: ETHERCAT bus error", "suggest...") \
_D(TOOL_ERR_ETHERCAT_BUS, 20033, "tool error: ETHERCAT bus error", "suggest...") \
_D(EC_ERR_FRAME_LOST, 20034, "EtherCat Bus error: EC Frame Lost", "(a) Please inspect EC terminals and wiring harness. (b) verify the temperature of base and joint MCU.") \
_D(IFACE_ERR_APP_FAULT, 20035, "Iface APP is corrupted. Maybe reason: (a) in boot mode not have app. (b) app size is over limit. (c) app crc is error", "please update app firmware") \
_D(IFACE_ERR_SLAVE_APP_FAULT, 20036, "Iface slave APP is corrupted. Maybe reason: (a) in boot mode not have app. (b) app size is over limit. (c) app crc is error", "please update app firmware")\
_D(TOOL_ERR_APP_FAULT, 20037, "Tool APP is corrupted. Maybe reason: (a) in boot mode not have app. (b) app size is over limit. (c) app crc is error", "please update app firmware") \
_D(BASE_ERR_SLAVE_APP_FAULT, 20038, "Base APP is corrupted. Maybe reason: (a) in boot mode not have app. (b) app size is over limit. (c) app crc is error", "please update app firmware")
#define HARDWARE_INTERFACE_ERRORS \
_D(HW_SCB_SETUP_FAILED, 60001, "Setup of Interface Board failed", "suggest...") \

View File

@ -181,7 +181,13 @@
_D(WRONG_JOINT_POS_LIMIT, 30446, "Joint limit max pos less than min pos.", "suggest...") \
_D(WRONG_JOINT_VEL_LIMIT, 30447, "Joint limit max vel is invalid.", "suggest...") \
_D(AUTO_RESUME_FAR_PAUSE_PT, 30448, "Robot is still paused after switching to automatic mode. Current joint position [" _PH1_ "] is too far away from pause position [" _PH2_ "]. Resuming directly may cause collision.", "Move the robot back to the pause position or stop the program before resuming.") \
_D(CONVEYOR_TRACK_CAPACITY_EXCEEDED, 30449, "Conveyor" _PH1_ ": item" _PH2_ " tracking capacity exceeded, tracking stop started. Capacity usage is " _PH3_ "%, actual conveyor speed is " _PH4_ " m/s.", "Reduce conveyor speed, shorten tracking distance, or adjust tracking posture.")
_D(CONVEYOR_TRACK_CAPACITY_EXCEEDED, 30449, "Conveyor" _PH1_ ": item" _PH2_ " tracking capacity exceeded, tracking stop started. Capacity usage is " _PH3_ "%, actual conveyor speed is " _PH4_ " m/s.", "Reduce conveyor speed, shorten tracking distance, or adjust tracking posture.") \
_D(JACOBIAN_SINGULARITY_RISK, 30450, "Jacobian singularity risk detected during Cartesian linear motion. Continuing linear motion may cause excessive joint speed.", "Move away from this area, change robot posture, or avoid linear motion through this pose.") \
_D(PSTOP_JOINT_CURRENT_VIOLATION, 30451, "Protective Stop: Target joint current exceed limits", "suggest...") \
_D(PSTOP_SPEED_SERVO_TARGET_VEL_NOT_ZERO, 30452, "Protective Stop: Disable speed servo mode failed that target speed is not set to zero", "suggest...") \
_D(PSTOP_CURRENT_SERVO_VEL_NOT_ZERO, 30453, "Protective Stop: Disable current servo mode failed that speed is not set to zero", "suggest...") \
_D(POWERON_POS_OUT_OF_LIMIT, 30454, "Current position exceeds joint limits after power on.", "suggest...") \
_D(HANDLE_PROGRAM_STATE_TRIGGER, 30455, "Handle Program State Trigger: " _PH1_, "suggest...")
// clang-format on
#endif // AUBO_SDK_RTM_ERROR_H

View File

@ -60,11 +60,15 @@ public:
* pose_add = poseAdd({0.2, 0.5, 0.1, 1.57, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseAdd","params":[[0.2, 0.5, 0.1, 1.57,
* 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.4,1.0,0.7,3.14,-0.0,0.0]}
* @endcode
* \endengish
*
* \chinese
@ -90,11 +94,15 @@ public:
* pose_add = poseAdd({0.2, 0.5, 0.1, 1.57, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseAdd","params":[[0.2, 0.5, 0.1, 1.57,
* 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.4,1.0,0.7,3.14,-0.0,0.0]}
* @endcode
* \endchinese
*/
std::vector<double> poseAdd(const std::vector<double> &p1,
@ -126,11 +134,15 @@ public:
* pose_sub = poseSub({0.2, 0.5, 0.1, 1.57, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseSub","params":[[0.2, 0.5, 0.1, 1.57,
* 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,-0.5,0.0,-0.0,0.0]}
* @endcode
* \endchinese
*
* \english
@ -160,11 +172,15 @@ public:
* pose_sub = poseSub({0.2, 0.5, 0.1, 1.57, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseSub","params":[[0.2, 0.5, 0.1, 1.57,
* 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,-0.5,0.0,-0.0,0.0]}
* @endcode
* \endenglish
*/
std::vector<double> poseSub(const std::vector<double> &p1,
@ -195,11 +211,15 @@ public:
* pose_interpolate = interpolatePose({0.2, 0.2, 0.4, 0, 0, 0},{0.2, 0.2, 0.6, 0, 0, 0},0.5)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.interpolatePose","params":[[0.2, 0.2,
* 0.4, 0, 0, 0],[0.2, 0.2, 0.6, 0, 0, 0],0.5],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.2,0.2,0.5,0.0,-0.0,0.0]}
* @endcode
* \endchinese
*
* \english
@ -225,11 +245,15 @@ public:
* pose_interpolate = interpolatePose({0.2, 0.2, 0.4, 0, 0, 0},{0.2, 0.2, 0.6, 0, 0, 0},0.5)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.interpolatePose","params":[[0.2, 0.2,
* 0.4, 0, 0, 0],[0.2, 0.2, 0.6, 0, 0, 0],0.5],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.2,0.2,0.5,0.0,-0.0,0.0]}
* @endcode
* \endenglish
*
*/
@ -274,11 +298,15 @@ public:
* pose_trans = poseTrans({0.2, 0.5, 0.1, 1.57, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseTrans","params":[[0.2, 0.5,
* 0.1, 1.57, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.4,-0.09960164640373415,0.6004776374923573,3.14,-0.0,0.0]}
* @endcode
* \endchinese
*
* \english
@ -321,11 +349,15 @@ public:
* pose_trans = poseTrans({0.2, 0.5, 0.1, 1.57, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseTrans","params":[[0.2, 0.5,
* 0.1, 1.57, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.4,-0.09960164640373415,0.6004776374923573,3.14,-0.0,0.0]}
* @endcode
* \endenglish
*/
std::vector<double> poseTrans(const std::vector<double> &pose_from,
@ -354,11 +386,15 @@ public:
* pose_trans_inv = poseTransInv({0.4, -0.0996016, 0.600478, 3.14, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseTransInv","params":[[0.4, -0.0996016,
* 0.600478, 3.14, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.2,0.5000000464037341,0.10000036250764266,1.57,-0.0,0.0]}
* @endcode
* \endenglish
*
* @ingroup Math
@ -384,11 +420,15 @@ public:
* pose_trans_inv = poseTransInv({0.4, -0.0996016, 0.600478, 3.14, 0, 0},{0.2, 0.5, 0.6, 1.57, 0, 0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseTransInv","params":[[0.4, -0.0996016,
* 0.600478, 3.14, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.2,0.5000000464037341,0.10000036250764266,1.57,-0.0,0.0]}
* @endcode
* \endchinese
*/
std::vector<double> poseTransInv(const std::vector<double> &pose_from,
@ -412,12 +452,16 @@ public:
* pose_inverse = poseInverse({0.2, 0.5, 0.1, 1.57, 0, 3.14})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseInverse","params":[[0.2, 0.5,
* 0.1, 1.57, 0, 3.14]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.19920341988726448,-0.09960155178838484,-0.5003973704832628,
* 1.5699999989900404,-0.0015926530848129354,-3.1415913853161266]}
* @endcode
*
* \endchinese
*
@ -437,12 +481,16 @@ public:
* pose_inverse = poseInverse({0.2, 0.5, 0.1, 1.57, 0, 3.14})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseInverse","params":[[0.2, 0.5,
* 0.1, 1.57, 0, 3.14]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.19920341988726448,-0.09960155178838484,-0.5003973704832628,
* 1.5699999989900404,-0.0015926530848129354,-3.1415913853161266]}
* @endcode
* \endenglish
*
*/
@ -464,11 +512,15 @@ public:
* pose_distance = poseDistance({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},{0.2, 0.5, 0.6, 0, -0.172, 0.0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseDistance","params":[[0.1, 0.3, 0.1,
* 0.3142, 0.0, 1.571],[0.2, 0.5, 0.6, 0, -0.172, 0.0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0.5477225575051661}
* @endcode
* \endchinese
*
* \english
@ -485,11 +537,15 @@ public:
* pose_distance = poseDistance({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},{0.2, 0.5, 0.6, 0, -0.172, 0.0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseDistance","params":[[0.1, 0.3, 0.1,
* 0.3142, 0.0, 1.571],[0.2, 0.5, 0.6, 0, -0.172, 0.0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0.5477225575051661}
* @endcode
* \endenglish
*
*/
@ -549,11 +605,15 @@ public:
* pose_equal = poseEqual({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},{0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711},0.01)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseEqual","params":[[0.1, 0.3, 0.1,
* 0.3142, 0.0, 1.571],[0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711],0.01]],"id":1}
* 0.3142, 0.0, 1.571],[0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711],0.01],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0.0}
* @endcode
* \endchinese
*
* \english
@ -571,11 +631,15 @@ public:
* pose_equal = poseEqual({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},{0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711},0.01)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.poseEqual","params":[[0.1, 0.3, 0.1,
* 0.3142, 0.0, 1.571],[0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711],0.01],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0.0}
* @endcode
* \endenglish
*/
bool poseEqual(const std::vector<double> &p1, const std::vector<double> &p2,
@ -667,11 +731,15 @@ public:
* quaternion = rpyToQuaternion({0.611, 0.785, 0.960})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.rpyToQuaternion","params":[[0.611, 0.785,
* 0.960]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.834721517970497,0.07804256900772265,0.4518931575790371,0.3048637712043723]}
* @endcode
* \endchinese
*
* \english
@ -690,11 +758,15 @@ public:
* quaternion = rpyToQuaternion({0.611, 0.785, 0.960})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.rpyToQuaternion","params":[[0.611, 0.785,
* 0.960]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.834721517970497,0.07804256900772265,0.4518931575790371,0.3048637712043723]}
* @endcode
* \endenglish
*/
std::vector<double> rpyToQuaternion(const std::vector<double> &rpy);
@ -717,11 +789,15 @@ public:
* rpy = quaternionToRpy({0.834722,0.0780426, 0.451893, 0.304864})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.quaternionToRpy","params":[[0.834722,
* 0.0780426, 0.451893, 0.304864]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.6110000520523781,0.7849996877683915,0.960000543982093]}
* @endcode
* \endchinese
*
* \english
@ -740,11 +816,15 @@ public:
* rpy = quaternionToRpy({0.834722,0.0780426, 0.451893, 0.304864})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.quaternionToRpy","params":[[0.834722,
* 0.0780426, 0.451893, 0.304864]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.6110000520523781,0.7849996877683915,0.960000543982093]}
* @endcode
* \endenglish
*/
std::vector<double> quaternionToRpy(const std::vector<double> &quat);
@ -832,11 +912,15 @@ public:
* coord_pose, cal_result = calibrateCoordinate(p,0)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.calibrateCoordinate","params":[[[0.55462,0.06219,0.37175,-3.142,0.0,1.580],
* [0.63746,0.11805,0.37175,-3.142,0.0,1.580],[0.40441,0.28489,0.37174,-3.142,0.0,1.580]],0],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.55462,0.06219,0.37175,-3.722688983883945e-05,-1.6940658945086007e-21,0.5932768162455785],0]}
* @endcode
* \endchinese
*
* \english
@ -863,11 +947,15 @@ public:
* coord_pose, cal_result = calibrateCoordinate(p,0)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.calibrateCoordinate","params":[[[0.55462,0.06219,0.37175,-3.142,0.0,1.580],
* [0.63746,0.11805,0.37175,-3.142,0.0,1.580],[0.40441,0.28489,0.37174,-3.142,0.0,1.580]],0],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.55462,0.06219,0.37175,-3.722688983883945e-05,-1.6940658945086007e-21,0.5932768162455785],0]}
* @endcode
* \endenglish
*/
ResultWithErrno calibrateCoordinate(
@ -895,13 +983,17 @@ public:
* {0.5488696249770836,-0.0389996547187214,0.3599720701808496,-3.141591980384691,-3.673205102557476e-06,1.570796326792422},1)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.calculateCircleFourthPoint","params":[[0.5488696249770836,-0.1214996547187204,0.2631931199112321,-3.14159198038469,-3.673205103150083e-06,1.570796326792424],
* [0.5488696249770835,-0.1214996547187207,0.3599720701808493,-3.14159198038469,-3.6732051029273e-06,1.570796326792423],
* [0.5488696249770836,-0.0389996547187214,0.3599720701808496,-3.141591980384691,-3.673205102557476e-06,
* 1.570796326792422],1],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.5488696249770837,-0.031860179583911546,0.27033259504604207,-3.1415919803846903,-3.67320510285378e-06,1.570796326792423],1]}
* @endcode
*
* \endchinese
*
@ -925,13 +1017,17 @@ public:
* {0.5488696249770836,-0.0389996547187214,0.3599720701808496,-3.141591980384691,-3.673205102557476e-06,1.570796326792422},1)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Math.calculateCircleFourthPoint","params":[[0.5488696249770836,-0.1214996547187204,0.2631931199112321,-3.14159198038469,-3.673205103150083e-06,1.570796326792424],
* [0.5488696249770835,-0.1214996547187207,0.3599720701808493,-3.14159198038469,-3.6732051029273e-06,1.570796326792423],
* [0.5488696249770836,-0.0389996547187214,0.3599720701808496,-3.141591980384691,-3.673205102557476e-06,
* 1.570796326792422],1],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.5488696249770837,-0.031860179583911546,0.27033259504604207,-3.1415919803846903,-3.67320510285378e-06,1.570796326792423],1]}
* @endcode
*
* \endenglish
*/

File diff suppressed because it is too large Load Diff

View File

@ -126,10 +126,14 @@ public:
* fcEnable()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endchinese
*
@ -161,10 +165,14 @@ public:
* fcEnable()
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
@ -193,10 +201,14 @@ public:
* fcDisable()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*
* \english
@ -222,10 +234,14 @@ public:
* fcDisable()
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
@ -250,10 +266,14 @@ public:
* Fc_status = isFcEnabled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
* \endchinese
*
* \english
@ -273,10 +293,14 @@ public:
* Fc_status = isFcEnabled()
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
* \endenglish
*/
bool isFcEnabled();
@ -963,10 +987,14 @@ public:
* Fc_Model = getDynamicModel()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
* @endcode
* \endchinese
* \english
* Get force control dynamics model
@ -986,10 +1014,14 @@ public:
* Fc_Model = getDynamicModel()
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
* @endcode
* \endenglish
*/
DynamicsModel getDynamicModel();
@ -1577,10 +1609,14 @@ public:
* setCondActive()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* Activate force control termination condition
@ -1602,10 +1638,14 @@ public:
* setCondActive()
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int setCondActive();
@ -1629,10 +1669,14 @@ public:
* status = isCondFullfiled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
* \endchinese
* \english
* Check if the force control termination condition has been fulfilled
@ -1651,10 +1695,14 @@ public:
* status = isCondFullfiled()
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
* \endenglish
*/
bool isCondFullfiled();
@ -2154,10 +2202,14 @@ public:
* resetLpFilter() -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* Reset low-pass filter
@ -2176,10 +2228,14 @@ public:
* resetLpFilter() -> nil
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int resetLpFilter();
@ -2250,10 +2306,14 @@ public:
* speedChangeDisable() -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* Deactivate FC SpeedChange function.
@ -2272,10 +2332,14 @@ public:
* speedChangeDisable() -> nil
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int speedChangeDisable();
@ -2402,10 +2466,14 @@ public:
* resetDamping() -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* Reset damping parameters
@ -2424,10 +2492,14 @@ public:
* resetDamping() -> nil
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int resetDamping();
@ -2445,10 +2517,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* Enable soft float function.
@ -2461,10 +2537,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int softFloatEnable();
@ -2482,10 +2562,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":-1}
* @endcode
* \endchinese
* \english
* Disable soft float function.
@ -2498,10 +2582,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":-1}
* @endcode
* \endenglish
*/
int softFloatDisable();
@ -2516,10 +2604,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
* \endchinese
* \english
* Returns whether soft float is enabled
@ -2529,10 +2621,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC Request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC Response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
* \endenglish
*/
bool isSoftFloatEnabled();

File diff suppressed because it is too large Load Diff

View File

@ -143,6 +143,58 @@ public:
const std::vector<std::vector<double>> &poses, const double &mass,
const std::vector<double>&cog);
/**
* @ingroup RobotAlgorithm
* \chinese
* 根据关节力矩传感器的信息标定负载动力学参数。
*
* 输入多组差异较大的标定位姿关节角和对应的关节力矩传感器数据,
* 辨识工具/负载在法兰坐标系下描述的质量、质心以及关节力矩偏置。
*
* @param joint_pos 各标定位姿关节角,至少 4 组较大差异位姿,每组维度应等于机器人自由度
* @param torq_sensor 与 joint_pos 一一对应的关节力矩传感器数据,每组维度应等于机器人自由度
* @return 标定结果以及错误代码。第一个返回值为 std::vector<double>,
* 内容依次为 mass、center[0..2];
* 第二个返回值为错误代码,错误代码 < 0 表示辨识失败。
*
* @throws arcs::common_interface::AuboException
*
* @par Python函数原型
* calibPayloadWithJointSensor(self: pyaubo_sdk.RobotAlgorithm, arg0:
* List[List[float]], arg1: List[List[float]]) -> Tuple[List[float], int]
*
* @par Lua函数原型
* calibPayloadWithJointSensor(joint_pos: table, torq_sensor: table) -> table, number
* \endchinese
* \english
* Calibrate payload dynamic parameters with joint torque sensor data.
*
* This interface identifies the payload mass, center of mass described in
* the flange frame, and joint torque offsets from multiple distinct joint
* calibration poses and corresponding joint torque sensor samples.
*
* @param joint_pos Joint positions of calibration poses. At least 4
* distinct poses are required, and each sample size must match robot DOF.
* @param torq_sensor Joint torque sensor data corresponding to joint_pos.
* Each sample size must match robot DOF.
* @return Calibration result and error code. The first return value is
* std::vector<double> in the order mass, center[0..2];
* the second return value is the error code. Error code < 0 means failure.
*
* @throws arcs::common_interface::AuboException
*
* @par Python function prototype
* calibPayloadWithJointSensor(self: pyaubo_sdk.RobotAlgorithm, arg0:
* List[List[float]], arg1: List[List[float]]) -> Tuple[List[float], int]
*
* @par Lua function prototype
* calibPayloadWithJointSensor(joint_pos: table, torq_sensor: table) -> table, number
* \endenglish
*/
ResultWithErrno calibPayloadWithJointSensor(
const std::vector<std::vector<double>> &joint_pos,
const std::vector<std::vector<double>> &torq_sensor);
/**
* @ingroup RobotAlgorithm
* \chinese
@ -225,10 +277,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.payloadCalculateFinished","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endchinese
* \english
@ -238,10 +294,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.payloadCalculateFinished","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endenglish
*/
@ -256,10 +316,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.getPayloadIdentifyResult","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.0,[],[],[]]}
* @endcode
*
* \endchinese
* \english
@ -269,10 +333,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.getPayloadIdentifyResult","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[0.0,[],[],[]]}
* @endcode
*
* \endenglish
*/
@ -504,10 +572,14 @@ public:
* pose, fk_result = forwardKinematics({3.083,1.227,1.098,0.670,-1.870,-0.397})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardKinematics","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.7137448715395925,0.08416057568819092,0.6707994191515292,2.4599818776908724,0.4789772388601265,1.6189630435878408],0]}
* @endcode
* \endchinese
* \english
* Forward kinematics, based on the activated TCP offset (the most recently set via setTcpOffset)
@ -532,10 +604,14 @@ public:
* pose, fk_result = forwardKinematics({3.083,1.227,1.098,0.670,-1.870,-0.397})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardKinematics","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.7137448715395925,0.08416057568819092,0.6707994191515292,2.4599818776908724,0.4789772388601265,1.6189630435878408],0]}
* @endcode
* \endenglish
*/
ResultWithErrno forwardKinematics(const std::vector<double> &q);
@ -584,11 +660,15 @@ public:
* pose, fk_result = forwardKinematics1({3.083,1.227,1.098,0.670,-1.870,-0.397},{0.0,0.13201,0.03879,0,0,0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardKinematics1","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],[0.0,
* 0.13201,0.03879,0,0,0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.7137636726659518,0.0837705432006433,0.6710022027216355,2.459981877690872,0.4789772388601267,1.6189630435878408],0]}
* @endcode
*
* @since 0.24.1
* \endchinese
@ -616,11 +696,15 @@ public:
* pose, fk_result = forwardKinematics1({3.083,1.227,1.098,0.670,-1.870,-0.397},{0.0,0.13201,0.03879,0,0,0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardKinematics1","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],[0.0,
* 0.13201,0.03879,0,0,0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.7137636726659518,0.0837705432006433,0.6710022027216355,2.459981877690872,0.4789772388601267,1.6189630435878408],0]}
* @endcode
*
* @since 0.24.1
* \endenglish
@ -649,10 +733,14 @@ public:
* pose, fk_result = forwardToolKinematics({3.083,1.227,1.098,0.670,-1.870,-0.397})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardToolKinematics","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.5881351149440136,0.05323734739426938,0.623922550656701,2.4599818776908724,0.4789772388601265,1.6189630435878408],0]}
* @endcode
* \endchinese
* \english
* Forward kinematics (ignoring TCP offset)
@ -673,10 +761,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardToolKinematics","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.5881351149440136,0.05323734739426938,0.623922550656701,2.4599818776908724,0.4789772388601265,1.6189630435878408],0]}
* @endcode
* \endenglish
*/
ResultWithErrno forwardToolKinematics(const std::vector<double> &q);
@ -706,9 +798,12 @@ public:
* poses, fk_result = forwardKinematicsAll({3.083,1.227,1.098,0.670,-1.870,-0.397})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardKinematicsAll","params":{"q":[-7.32945e-11,-0.261799,1.74533,0.436332,1.5708,-2.14136e-10]},"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[0.0010004,0.0,0.122,0.0,0.0,3.141592653589793],
* [0.0010003999910823934,-0.12166795404953117,0.12205392567412496,1.5690838552993878,-1.3089969602251492,0.0016541204887245322],
* [0.10659809449330016,-0.12166124765791932,0.5161518260534821,-1.5718540206872664,0.43633111081725523,-0.002370419930605744],
@ -716,6 +811,7 @@ public:
* [0.5519603828181741,-0.12282266347465487,0.35639753697117343,1.5707938201843654,0.0042721909279596635,1.569044569428874],
* [0.5513243939877184,-0.12401224959696328,0.2615193425222568,-3.1349118101994096,0.004272190926529066,1.569044569643007],
* [0.7494883076798231,-0.025647479212994567,-0.04023458911333461,-3.1349118101994096,0.004272190926529066,1.569044569643007]],0]}
* @endcode
* \endchinese
* \english
* Forward kinematics, based on the activated TCP offset (the most recently set via setTcpOffset)
@ -740,9 +836,12 @@ public:
* pose, fk_result = forwardKinematicsAll({3.083,1.227,1.098,0.670,-1.870,-0.397})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.forwardKinematicsAll","params":{"q":[-7.32945e-11,-0.261799,1.74533,0.436332,1.5708,-2.14136e-10]},"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[0.0010004,0.0,0.122,0.0,0.0,3.141592653589793],
* [0.0010003999910823934,-0.12166795404953117,0.12205392567412496,1.5690838552993878,-1.3089969602251492,0.0016541204887245322],
* [0.10659809449330016,-0.12166124765791932,0.5161518260534821,-1.5718540206872664,0.43633111081725523,-0.002370419930605744],
@ -750,6 +849,7 @@ public:
* [0.5519603828181741,-0.12282266347465487,0.35639753697117343,1.5707938201843654,0.0042721909279596635,1.569044569428874],
* [0.5513243939877184,-0.12401224959696328,0.2615193425222568,-3.1349118101994096,0.004272190926529066,1.569044569643007],
* [0.7494883076798231,-0.025647479212994567,-0.04023458911333461,-3.1349118101994096,0.004272190926529066,1.569044569643007]],0]}
* @endcode
* \endenglish
*/
ResultWithErrno1 forwardKinematicsAll(const std::vector<double> &q);
@ -788,10 +888,14 @@ public:
* joint,ik_result = inverseKinematics({0,0,0,0,0,0},{0.81665,-0.20419,0.43873,-3.135,0.004,1.569})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematics","params":[[0,0,0,0,0,0],[0.71374,0.08417,0.6708,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],0]}
* @endcode
* \endchinese
* \english
* Inverse kinematics
@ -825,10 +929,14 @@ public:
* joint,ik_result = inverseKinematics({0,0,0,0,0,0},{0.81665,-0.20419,0.43873,-3.135,0.004,1.569})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematics","params":[[0,0,0,0,0,0],[0.71374,0.08417,0.6708,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],0]}
* @endcode
* \endenglish
*/
ResultWithErrno inverseKinematics(const std::vector<double> &qnear,
@ -879,11 +987,15 @@ public:
* joint,ik_result = inverseKinematics1({0,0,0,0,0,0},{0.81665,-0.20419,0.43873,-3.135,0.004,1.569},{0.04,-0.035,0.1,0,0,0})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematics1","params":[[0,0,0,0,0,0],[0.71374,0.08417,0.6708,2.46,0.479,1.619],[0.0,
* 0.13201,0.03879,0,0,0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.084454549595208,1.2278265883747776,1.0986586440159576,0.6708221281915528,-1.8712459848518375,-0.3965111476861782],0]}
* @endcode
* \endchinese
* \english
* Inverse kinematics
@ -906,11 +1018,15 @@ public:
* joint,ik_result = inverseKinematics1({0,0,0,0,0,0},{0.81665,-0.20419,0.43873,-3.135,0.004,1.569},{0.04,-0.035,0.1,0,0,0})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematics1","params":[[0,0,0,0,0,0],[0.71374,0.08417,0.6708,2.46,0.479,1.619],[0.0,
* 0.13201,0.03879,0,0,0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.084454549595208,1.2278265883747776,1.0986586440159576,0.6708221281915528,-1.8712459848518375,-0.3965111476861782],0]}
* @endcode
* \endenglish
*/
ResultWithErrno inverseKinematics1(const std::vector<double> &qnear,
@ -951,10 +1067,14 @@ public:
* joint,ik_result = inverseKinematics2({0,0,0,0,0,0},{0.81665,-0.20419,0.43873,-3.135,0.004,1.569})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematics2","params":[[0,0,0,0,0,0],[0.71374,0.08417,0.6708,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],0]}
* @endcode
* \endchinese
* \english
* Inverse kinematics with the same robot configuration and minimum joint change
@ -988,10 +1108,14 @@ public:
* joint,ik_result = inverseKinematics2({0,0,0,0,0,0},{0.81665,-0.20419,0.43873,-3.135,0.004,1.569})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematics2","params":[[0,0,0,0,0,0],[0.71374,0.08417,0.6708,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],0]}
* @endcode
* \endenglish
*/
ResultWithErrno inverseKinematics2(const std::vector<double> &qnear,
@ -1009,13 +1133,17 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematicsAll","params":[[0.71374,0.08417,0.6708,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],
* [3.081056801097411,0.17985038037652645,-1.0991717292664145,-0.4806460200109001,-1.869182975312333,-0.402066016835411],
* [0.4090095277807992,-0.1623365054641728,1.081775890307679,0.26993250263224805,0.9738255833642309,0.000572556627720845],
* [0.4116449425067969,-1.1931664523907126,-1.0822709833775688,-0.8665964106161371,0.9732141569888207,0.006484919654891586]],0]}
* @endcode
* \endchinese
* \english
* Solve all inverse kinematics solutions based on the activated TCP offset
@ -1027,13 +1155,17 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematicsAll","params":[[0.71374,0.08417,0.6708,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627],
* [3.081056801097411,0.17985038037652645,-1.0991717292664145,-0.4806460200109001,-1.869182975312333,-0.402066016835411],
* [0.4090095277807992,-0.1623365054641728,1.081775890307679,0.26993250263224805,0.9738255833642309,0.000572556627720845],
* [0.4116449425067969,-1.1931664523907126,-1.0822709833775688,-0.8665964106161371,0.9732141569888207,0.006484919654891586]],0]}
* @endcode
* \endenglish
*/
ResultWithErrno1 inverseKinematicsAll(const std::vector<double> &pose);
@ -1051,14 +1183,18 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematicsAll1","params":[[0.71374,0.08417,0.6708,2.46,0.479,1.619],[0.0,
* 0.13201,0.03879,0,0,0]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[3.084454549595208,1.2278265883747776,1.0986586440159576,0.6708221281915528,-1.8712459848518375,-0.3965111476861782],
* [3.0818224058231602,0.17980369843203092,-1.0997576631122077,-0.48102131527371267,-1.8697135490338517,-0.40149459722060593],
* [0.40972960018231047,-0.16226026285489026,1.0823403816496,0.2700204411869427,0.9734251963887868,0.0012903686498106507],
* [0.41236549588802296,-1.193621392918341,-1.0828346680836718,-0.8671097369314354,0.972815367289568,0.007206851371073478]],0]}
* @endcode
* \endchinese
* \english
* Solve all inverse kinematics solutions based on the provided TCP offset
@ -1071,14 +1207,18 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseKinematicsAll1","params":[[0.71374,0.08417,0.6708,2.46,0.479,1.619],[0.0,
* 0.13201,0.03879,0,0,0]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[3.084454549595208,1.2278265883747776,1.0986586440159576,0.6708221281915528,-1.8712459848518375,-0.3965111476861782],
* [3.0818224058231602,0.17980369843203092,-1.0997576631122077,-0.48102131527371267,-1.8697135490338517,-0.40149459722060593],
* [0.40972960018231047,-0.16226026285489026,1.0823403816496,0.2700204411869427,0.9734251963887868,0.0012903686498106507],
* [0.41236549588802296,-1.193621392918341,-1.0828346680836718,-0.8671097369314354,0.972815367289568,0.007206851371073478]],0]}
* @endcode
* \endenglish
*/
ResultWithErrno1 inverseKinematicsAll1(
@ -1106,10 +1246,14 @@ public:
* joint, ik_result = inverseToolKinematics({0,0,0,0,0,0},{0.58815,0.0532,0.62391,2.46,0.479,1.619})
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseToolKinematics","params":[[0,0,0,0,0,0],[0.58815,0.0532,0.62391,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.083609363838651,1.22736129158332,1.098095443698268,0.6705395395487186,-1.8706605026855632,-0.39714507002376465],0]}
* @endcode
* \endchinese
* \english
* Inverse kinematics (ignoring TCP offset)
@ -1130,10 +1274,14 @@ public:
* joint, ik_result = inverseToolKinematics({0,0,0,0,0,0},{0.58815,0.0532,0.62391,2.46,0.479,1.619})
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseToolKinematics","params":[[0,0,0,0,0,0],[0.58815,0.0532,0.62391,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[3.083609363838651,1.22736129158332,1.098095443698268,0.6705395395487186,-1.8706605026855632,-0.39714507002376465],0]}
* @endcode
* \endenglish
*/
ResultWithErrno inverseToolKinematics(const std::vector<double> &qnear,
@ -1151,13 +1299,17 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseToolKinematicsAll","params":[[0.58815,0.0532,0.62391,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[3.083609363838651,1.22736129158332,1.098095443698268,0.6705395395487186,-1.8706605026855632,-0.39714507002376465],
* [3.0809781797426523,0.17987122696706134,-1.0991932793263717,-0.4807053707530958,-1.8691282890274434,-0.40212516672751814],
* [0.40892195618737215,-0.16235398607358653,1.081812753177426,0.27003586475871766,0.9738744130114284,0.00048462518316674287],
* [0.41155633414333076,-1.1932173012004512,-1.082306542045813,-0.8665312056504818,0.9732632365861417,0.0063958311601771175]],0]}
* @endcode
* \endchinese
* \english
* Inverse kinematics (ignoring TCP offset)
@ -1169,13 +1321,17 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.inverseToolKinematicsAll","params":[[0.58815,0.0532,0.62391,2.46,0.479,1.619]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[[3.083609363838651,1.22736129158332,1.098095443698268,0.6705395395487186,-1.8706605026855632,-0.39714507002376465],
* [3.0809781797426523,0.17987122696706134,-1.0991932793263717,-0.4807053707530958,-1.8691282890274434,-0.40212516672751814],
* [0.40892195618737215,-0.16235398607358653,1.081812753177426,0.27003586475871766,0.9738744130114284,0.00048462518316674287],
* [0.41155633414333076,-1.1932173012004512,-1.082306542045813,-0.8665312056504818,0.9732632365861417,0.0063958311601771175]],0]}
* @endcode
* \endenglish
*/
ResultWithErrno1 inverseToolKinematicsAll(const std::vector<double> &pose);
@ -1229,10 +1385,14 @@ public:
* end
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.getRobotConfiguration","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[4,0]}
* @endcode
* \endchinese
* \english
* Calculate and return the corresponding robot configuration based on input joint angles
@ -1283,10 +1443,14 @@ public:
* end
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.getRobotConfiguration","params":[[3.083688522170976,1.2273215976885394,1.098072739631141,0.6705738810610149,-1.870715392248607,-0.39708546603119627]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[4,0]}
* @endcode
* \endenglish
*/
ResultWithErrno3 getRobotConfiguration(const std::vector<double>& q);
@ -1380,15 +1544,19 @@ public:
* calJ_result = calJacobian({0.58815,0.0532,0.62391,2.46,0.479,1.619},true)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.calcJacobian","params":[[0.58815,0.0532,0.62391,2.46,0.479,1.619],true],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.20822779551242535,-0.5409416184208162,0.2019786999613013,0.061264982268770196,-0.026269884327316487,
* 0.10131708699859962,0.26388933410019777,-0.36074292664199115,0.1346954733416397,0.04085636647597124,-0.07244204452918337,0.0708466286633346,
* 0.0,0.10401808481666497,-0.12571344758923886,-0.07741290545882097,0.18818543519232858,0.04628646442706299,0.0,0.5548228314607867,
* -0.5548228314607868,0.5548228314607868,-0.7901273140338193,0.37230961532208007,0.0,-0.8319685244586092,0.8319685244586091,-0.8319685244586091,
* -0.5269197820578843,-0.8184088260676008,1.0,3.749399456654644e-33,-6.512048180336603e-18,1.0956823467534067e-16,-0.31313634553301894,
* 0.43771285536682175],0]}
* @endcode
* \endchinese
* \english
* Calculate the Jacobian matrix at the robot end-effector
@ -1423,15 +1591,19 @@ public:
* calJ_result = calJacobian({0.58815,0.0532,0.62391,2.46,0.479,1.619},true)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.calcJacobian","params":[[0.58815,0.0532,0.62391,2.46,0.479,1.619],true],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[[0.20822779551242535,-0.5409416184208162,0.2019786999613013,0.061264982268770196,-0.026269884327316487,
* 0.10131708699859962,0.26388933410019777,-0.36074292664199115,0.1346954733416397,0.04085636647597124,-0.07244204452918337,0.0708466286633346,
* 0.0,0.10401808481666497,-0.12571344758923886,-0.07741290545882097,0.18818543519232858,0.04628646442706299,0.0,0.5548228314607867,
* -0.5548228314607868,0.5548228314607868,-0.7901273140338193,0.37230961532208007,0.0,-0.8319685244586092,0.8319685244586091,-0.8319685244586091,
* -0.5269197820578843,-0.8184088260676008,1.0,3.749399456654644e-33,-6.512048180336603e-18,1.0956823467534067e-16,-0.31313634553301894,
* 0.43771285536682175],0]}
* @endcode
* \endenglish
*/
ResultWithErrno calcJacobian(const std::vector<double> &q,
@ -1609,10 +1781,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.payloadIdentifyTrajGenFinished","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endchinese
* \english
@ -1623,10 +1799,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.payloadIdentifyTrajGenFinished","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endenglish
*/
@ -1727,8 +1907,10 @@ public:
* needVibrationRecalib(param1: table, param2: table, threshold: number) -> number
*
* @par JSON-RPC示例
* @code{.json}
* {"jsonrpc":"2.0","method":"VibrationController.needVibrationRecalib",
* "params":[param1_obj, param2_obj, 0.1],"id":1}
* "params":[{}, {}, 0.1],"id":1}
* @endcode
* \endchinese
*/
int needVibrationRecalib(const VibrationRecalibrationParameter &param1,
@ -1787,12 +1969,16 @@ public:
* )
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.addCollisionBox",
* "params":["env_box","world",[[0.4,0.4,0.2]],
* [[0.6,0.0,0.1,0.0,0.0,0.0]]],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*
* \english
@ -1846,12 +2032,16 @@ public:
* )
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.addCollisionBox",
* "params":["env_box","world",[[0.4,0.4,0.2]],
* [[0.6,0.0,0.1,0.0,0.0,0.0]]],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int addCollisionBox(const std::string &name,
@ -1880,11 +2070,15 @@ public:
* robot_algorithm.removeCollisionObject("tool_box")
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.removeCollisionObject",
* "params":["tool_box"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*
* \english
@ -1906,11 +2100,15 @@ public:
* robot_algorithm.removeCollisionObject("tool_box")
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.removeCollisionObject",
* "params":["tool_box"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int removeCollisionObject(const std::string &name);
@ -2002,12 +2200,16 @@ public:
* result = validatePath1(1, start_joint, 0.01, end_pose, 0.01, 0.05, True)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.validatePath1","params":[0,
* [0.0,0.0,1.57,0.0,1.57,0.0], 0.01, [0.52,0.0,1.57,0.0,1.57,0.0], 0.01,
* 0.05, true],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*
* \english
@ -2059,11 +2261,16 @@ public:
* result = validatePath1(1, start_joint, 0.01, end_pose, 0.01, 0.005, True)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.validatePath1","params":[0,
* [0.0,0.0,1.57,0.0,1.57,0.0], 0.01, [0.52,0.0,1.57,0.0,1.57,0.0], 0.01,
* 0.005, true],"id":1}
* @endcode
*
* @par JSON-RPC response example {"id":1,"jsonrpc":"2.0","result":0}
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int validatePath1(int type, const std::vector<double> &start, double r1,
@ -2284,9 +2491,209 @@ public:
* calibEndFeaturePosInFlange(pose: list[list[float]]) -> tuple[list[float], int]
*
* \endenglish
*/
*/
ResultWithErrno calibEndFeaturePosInFlange(const std::vector<std::vector<double>>& pose);
/**
* @ingroup RobotAlgorithm
* \chinese
* @brief 传送带快速标定
*
* 使用三个依次采集的点位和编码器计数,一次计算直线或圆形传送带的
* 跟随参数。该接口采用固定的快速标定布局:点1既是静默区终点、启动
* 窗口/工作区起点,也是跟随程序的示教参考点;点2是启动窗口终点;
* 点3是工作区终点。start_tick 是工件实际触发光电开关时单独记录的
* 编码器计数,即静默区起点。
* 采样期间传送带不得反向,start_tick 到点3的实际累计编码器增量必须
* 小于编码器半量程;允许计数跨越边界,但端点计数无法恢复多圈增量。
*
* @param type 传送带类型:0 表示直线传送带,1 表示圆形传送带。
* @param poses 恰好三个基坐标系下的 6D 位姿,顺序对应点1、点2、点3。
* 每个位姿为 [x, y, z, rx, ry, rz],姿态使用 ZYX RPY,位置单位为米,
* 姿态单位为弧度。
* @param ticks 恰好三个编码器计数,分别与 poses 中的点1、点2、点3
* 同步采集。
* @param start_tick 工件实际触发光电开关时的编码器计数,与点位计数
* 分开采集。
* @return 快速标定结果。track_ref 对直线传送带为
* [dx, dy, dz, 0, 0, 0];对圆形传送带为完整的圆心坐标系
* [x, y, z, rx, ry, rz],姿态使用 ZYX RPY,local Z 按点1到点2再到
* 点3的运动顺序定向。tick_per_unit 对直线为 tick/m,对圆形为
* tick/rad。window_min、window_max、limit、sensor_offset 和 work_length
* 对直线使用米,对圆形使用弧度。error_code 为 0 表示成功,负数表示
* 失败。
*
* 快速标定固定返回 sensor_offset == window_min,因为跟随示教参考点就
* 在点1。通用跟随配置中两者仍是独立参数;如应用需要不同值,请在
* 标定后分别调用 @ref MotionControl::setConveyorTrackSensorOffset 和
* @ref MotionControl::setConveyorTrackStartWindow 调整。
*
* @par Python函数原型
* calibConveyorTrack(type: int, poses: list[list[float]],
* ticks: list[int], start_tick: int) -> ConveyorCalibResult
*
* @par Lua函数原型
* calibConveyorTrack(type: number, poses: table, ticks: table,
* start_tick: number) -> ConveyorCalibResult
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.calibConveyorTrack",
* "params":[0,[[0.1,0,0,0,0,0],[0.3,0,0,0,0,0],
* [0.6,0,0,0,0,0]],[10,30,60],0],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":{"track_ref":[1,0,0,0,0,0],
* "tick_per_unit":100,"limit":0.6,"window_min":0.1,
* "window_max":0.3,"sensor_offset":0.1,"work_length":0.5,
* "error_code":0}}
* @endcode
* \endchinese
*
* \english
* @brief Conveyor quick calibration
*
* Computes the tracking parameters of a linear or circular conveyor from
* three sequentially sampled poses and encoder ticks. This quick
* calibration uses a fixed layout: point 1 is the silent-zone end, the
* start of both the start window and workspace, and the taught tracking
* reference; point 2 is the start-window end; point 3 is the workspace
* end. start_tick is recorded separately when the workpiece actually
* triggers the photoelectric sensor, which is the silent-zone start.
* The conveyor must not reverse during sampling, and the actual
* accumulated encoder delta from start_tick to point 3 must be less than
* half the encoder range. Counter wrap is supported, but endpoint counts
* cannot recover multiple complete wraps.
*
* @param type Conveyor type: 0 for linear, 1 for circular.
* @param poses Exactly three 6D poses in the base frame, ordered as
* points 1, 2, and 3. Each pose is [x, y, z, rx, ry, rz], with orientation
* expressed as ZYX RPY, position in metres, and orientation in radians.
* @param ticks Exactly three encoder ticks sampled synchronously with
* points 1, 2, and 3 in poses.
* @param start_tick Encoder tick recorded separately when the workpiece
* actually triggers the photoelectric sensor.
* @return Quick-calibration result. For a linear conveyor, track_ref is
* [dx, dy, dz, 0, 0, 0]. For a circular conveyor, it is the complete
* centre-frame pose [x, y, z, rx, ry, rz] in ZYX RPY, with local Z
* oriented by motion from point 1 through point 2 to point 3.
* tick_per_unit is tick/m for linear and tick/rad for circular conveyors.
* window_min, window_max, limit, sensor_offset, and work_length are in
* metres for linear and radians for circular conveyors. error_code is 0
* on success and negative on failure.
*
* Quick calibration always returns sensor_offset == window_min because
* the taught tracking reference is at point 1. They remain independent
* parameters in general tracking configurations. If an application needs
* different values, call @ref MotionControl::setConveyorTrackSensorOffset
* and @ref MotionControl::setConveyorTrackStartWindow after calibration.
*
* @par Python prototype
* calibConveyorTrack(type: int, poses: list[list[float]],
* ticks: list[int], start_tick: int) -> ConveyorCalibResult
*
* @par Lua prototype
* calibConveyorTrack(type: number, poses: table, ticks: table,
* start_tick: number) -> ConveyorCalibResult
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotAlgorithm.calibConveyorTrack",
* "params":[0,[[0.1,0,0,0,0,0],[0.3,0,0,0,0,0],
* [0.6,0,0,0,0,0]],[10,30,60],0],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":{"track_ref":[1,0,0,0,0,0],
* "tick_per_unit":100,"limit":0.6,"window_min":0.1,
* "window_max":0.3,"sensor_offset":0.1,"work_length":0.5,
* "error_code":0}}
* @endcode
* \endenglish
*/
ConveyorCalibResult calibConveyorTrack(
int type, const std::vector<std::vector<double>> &poses,
const std::vector<int> &ticks, int start_tick);
/**
* @ingroup RobotAlgorithm
* \chinese
* 标定直线导轨在机器人基坐标系下的方向。
*
* 输入至少三组有限的 TCP 位姿,每组为米/弧度单位的
* [x, y, z, rx, ry, rz]。建议从导轨零位开始;样本顺序必须与导轨
* 正方向移动顺序一致。采样过程中 TCP 必须始终接触同一个物理标定点;
* 标定某根导轨轴时,其他外轴必须保持不动。
*
* @param poses TCP 在基坐标系下的位姿。
* @return 成功时 result[0] = {x, y, z},表示机器人基坐标系中的 3D
* 单位方向;result[1] = {average, std, max, rms},四个统计量均为米
* 单位的位置残差。元组第 2 项为 ARAL 返回码,< 0 表示失败。
*
* \endchinese
* \english
* Calibrate a linear track direction in the robot base frame.
*
* Provide at least three finite 6D TCP poses [x, y, z, rx, ry, rz] in
* metres/radians. Starting from the track zero position is recommended.
* The sample order must follow motion along the positive travel direction.
* Keep the TCP on the same physical calibration point throughout sampling,
* and keep all other external axes stationary while calibrating one track
* axis.
*
* @param poses TCP poses in the base frame.
* @return On success, result[0] = {x, y, z}, the 3D unit direction in the
* robot base frame, and result[1] = {average, std, max, rms}. The four
* statistics are positional residuals in metres. Tuple item 2 is the
* ARAL return code; < 0 means failure.
* \endenglish
*/
ResultWithErrno1 calibLinearAxisInBase(
const std::vector<std::vector<double>> &poses);
/**
* @ingroup RobotAlgorithm
* \chinese
* 标定变位机单旋转轴在机器人基坐标系下的位姿。
*
* 输入至少四组有限的 TCP 位姿,每组为米/弧度单位的
* [x, y, z, rx, ry, rz]。标定过程中 TCP 必须始终接触同一个物理
* 标定点,其他变位机轴必须保持固定。
*
* @param poses TCP 在基坐标系下的位姿。
* @param axis_positions 对应的旋转轴位置,单位为弧度。必须为有限值,
* 与 poses 等长,并且严格递增或严格递减。
* @return 成功时 result[0] = T_b_axis,result[1] =
* {average, std, max, rms}。四个残差统计量均为米单位的位置误差。
* 元组第 2 项为 ARAL 返回码,< 0 表示失败。Lua 使用 result[1] 和
* result[2],Python 使用 result[0] 和 result[1]。
*
* \endchinese
* \english
* Calibrate a single rotary positioner axis pose in the robot base frame.
*
* Provide at least four finite 6D TCP poses [x, y, z, rx, ry, rz] in
* metres/radians. The TCP must stay on one physical calibration point,
* and every other positioner axis must remain fixed during calibration.
*
* @param poses TCP poses in the base frame.
* @param axis_positions Corresponding rotary-axis positions in radians.
* They must be finite, have the same size as poses, and be strictly
* increasing or strictly decreasing.
* @return On success, result[0] = T_b_axis and result[1] =
* {average, std, max, rms}. The four residual statistics are positional
* errors in metres. Tuple item 2 is the ARAL return code; < 0 means
* failure. Lua uses result[1]/result[2], while Python uses
* result[0]/result[1].
* \endenglish
*/
ResultWithErrno1 calibRotaryAxisInBase(
const std::vector<std::vector<double>> &poses,
const std::vector<double> &axis_positions);
/**
* @ingroup RobotAlgorithm

View File

@ -52,10 +52,14 @@ public:
* num = poweron()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.poweron","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ 实例
* @code
@ -84,10 +88,14 @@ public:
* num = poweron()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.poweron","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -119,10 +127,14 @@ public:
* num = startup()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.startup","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -150,10 +162,14 @@ public:
* num = startup()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.startup","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -185,10 +201,14 @@ public:
* num = releaseRobotBrake()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.releaseRobotBrake","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -216,10 +236,14 @@ public:
* num = releaseRobotBrake()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.releaseRobotBrake","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -251,10 +275,14 @@ public:
* num = lockRobotBrake()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.lockRobotBrake","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -282,10 +310,14 @@ public:
* num = lockRobotBrake()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.lockRobotBrake","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -317,10 +349,14 @@ public:
* num = poweroff()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.poweroff","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -348,10 +384,14 @@ public:
* num = poweroff()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.poweroff","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -388,10 +428,14 @@ public:
* num = backdrive(false)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.backdrive","params":[false],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -424,10 +468,14 @@ public:
* num = backdrive(false)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.backdrive","params":[false],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -466,10 +514,14 @@ public:
* num = freedrive(false)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.freedrive","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -504,10 +556,14 @@ public:
* num = freedrive(false)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.freedrive","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -717,10 +773,14 @@ public:
* Handguide = isHandguideEnabled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* \endchinese
* \english
@ -737,10 +797,14 @@ public:
* Handguide = isHandguideEnabled()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* \endenglish
*/
@ -771,10 +835,14 @@ public:
* num = setSim(true)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -807,10 +875,14 @@ public:
* num = setSim(true)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -845,10 +917,14 @@ public:
* num = setOperationalMode("Manual")
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -878,10 +954,14 @@ public:
* num = setOperationalMode("Manual")
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -913,10 +993,14 @@ public:
* num = getOperationalMode()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"Manual"}
* @endcode
*
* @par C++示例
* @code
@ -944,10 +1028,14 @@ public:
* num = getOperationalMode()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"Manual"}
* @endcode
*
* @par C++ example
* @code
@ -980,10 +1068,14 @@ public:
* num = getRobotControlMode()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"Position"}
* @endcode
*
* @par C++示例
* @code
@ -1011,10 +1103,14 @@ public:
* num = getRobotControlMode()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"Position"}
* @endcode
*
* @par C++ example
* @code
@ -1046,10 +1142,14 @@ public:
* FreedriveEnabled = isFreedriveEnabled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++示例
* @code
@ -1076,10 +1176,14 @@ public:
* FreedriveEnabled = isFreedriveEnabled()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++ example
* @code
@ -1111,10 +1215,14 @@ public:
* BackdriveEnabled = isBackdriveEnabled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++示例
* @code
@ -1141,10 +1249,14 @@ public:
* BackdriveEnabled = isBackdriveEnabled()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++ example
* @code
@ -1176,10 +1288,14 @@ public:
* SimulationEnabled = isSimulationEnabled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":true}
* @endcode
*
* @par C++示例
* @code
@ -1206,10 +1322,14 @@ public:
* SimulationEnabled = isSimulationEnabled()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":true}
* @endcode
*
* @par C++ example
* @code
@ -1244,10 +1364,14 @@ public:
* num = setUnlockProtectiveStop()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -1276,10 +1400,14 @@ public:
* num = setUnlockProtectiveStop()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -1313,10 +1441,14 @@ public:
* num = restartInterfaceBoard()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -1346,10 +1478,14 @@ public:
* num = restartInterfaceBoard()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -1630,10 +1766,14 @@ public:
* stopRecord()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endchinese
* \english
@ -1653,10 +1793,14 @@ public:
* stopRecord()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endenglish
*/
@ -1677,10 +1821,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endchinese
* \english
@ -1696,10 +1844,14 @@ public:
* @throws arcs::common_interface::AuboException
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* \endenglish
*/
@ -1730,10 +1882,14 @@ public:
* num = setLinkModeEnable(true)
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++示例
* @code
@ -1766,10 +1922,14 @@ public:
* num = setLinkModeEnable(true)
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
* @par C++ example
* @code
@ -1800,10 +1960,14 @@ public:
* LinkModeEnabled = isLinkModeEnabled()
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++示例
* @code
@ -1831,10 +1995,14 @@ public:
* LinkModeEnabled = isLinkModeEnabled()
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++ example
* @code
@ -1869,10 +2037,14 @@ public:
* generateDiagnoseFile("reason")
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++示例
* @code
@ -1903,10 +2075,14 @@ public:
* generateDiagnoseFile("reason")
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":false}
* @endcode
*
* @par C++ example
* @code

File diff suppressed because it is too large Load Diff

View File

@ -50,10 +50,14 @@ public:
* socketOpen(address: string, port: number, socket_name: string) -> nil
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketOpen","params":["172.16.26.248",8000,"socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
* \chinese
* 打开TCP/IP以太网通信socket
@ -72,10 +76,14 @@ public:
* socketOpen(address: string, port: number, socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketOpen","params":["172.16.26.248",8000,"socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*/
int socketOpen(const std::string &address, int port,
@ -99,10 +107,14 @@ public:
* socketClose(socket_name: string) -> nil
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketClose","params":["socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
* \chinese
* 关闭TCP/IP socket 通信
@ -120,10 +132,14 @@ public:
* socketClose(socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketClose","params":["socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*/
int socketClose(const std::string &socket_name = "socket_0");
@ -312,10 +328,14 @@ public:
* suffix: string, interpret_escape: boolean) -> number
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketReadString","params":["camera","socket_0","","",false],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
* \chinese
* 从socket读取所有数据并将其作为字符串返回。
@ -347,10 +367,14 @@ public:
* suffix: string, interpret_escape: boolean) -> number
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketReadString","params":["camera","socket_0","","",false],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*/
int socketReadString(const std::string &variable,
@ -378,10 +402,14 @@ public:
* socketReadAllString(variable: string, socket_name: string) -> number
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketReadAllString","params":["camera","socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
* \chinese
* 从socket读取所有数据并将其作为char向量返回。
@ -400,10 +428,14 @@ public:
* socketReadAllString(variable: string, socket_name: string) -> number
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketReadAllString","params":["camera","socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*/
int socketReadAllString(const std::string &variable,
@ -510,10 +542,14 @@ public:
* socketSendLine(str: string, socket_name: string) -> nil
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketSendLine","params":["abcd","socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
* \chinese
* 发送带有换行符的字符串到服务器.
@ -532,10 +568,14 @@ public:
* socketSendLine(str: string, socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketSendLine","params":["abcd","socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*/
int socketSendLine(const std::string &str,
@ -561,10 +601,14 @@ public:
* socketSendString(str: string, socket_name: string) -> nil
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketSendString","params":["abcd","socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
* \chinese
* 发送字符串到服务器
@ -583,10 +627,14 @@ public:
* socketSendString(str: string, socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"Socket.socketSendString","params":["abcd","socket_0"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
*/
int socketSendString(const std::string &str,

View File

@ -29,6 +29,7 @@
#include <string>
#include <memory>
#include <aubo/global_config.h>
#include <aubo/type_def.h>
namespace arcs {
namespace common_interface {
@ -100,7 +101,8 @@ public:
* @ingroup SyncMove
* \chinese
* 设置同步路径段的ID
* 在同步运动模式下,所有同时执行的移动指令必须全部编程为圆角区(corner zones)或全部为停止点(stop points)。
* 在同步运动模式下,所有同时执行的移动指令必须全部编程为圆角区(corner
* zones)或全部为停止点(stop points)。
* 这意味着具有相同ID的移动指令要么全部带有圆角区,要么全部带有停止点。
* 如果在各自的任务程序中同步执行的移动指令中,一个带有圆角区而另一个带有停止点,则会发生错误。
* 同步执行的移动指令可以有不同大小的圆角区(例如,一个使用z10,另一个使用z50)。
@ -117,10 +119,14 @@ public:
* \endchinese
* \english
* Set the ID for the synchronized path segment.
* In synchronized movements mode, all or none of the simultaneous move instructions must be programmed with corner zones.
* This means that move instructions with the same ID must either all have corner zones, or all have stop points.
* If a move instruction with a corner zone and a move instruction with a stop point are synchronously executed in their respective task program, an error will occur.
* Synchronously executed move instructions can have corner zones of different sizes (e.g. one uses z10 and one uses z50).
* In synchronized movements mode, all or none of the simultaneous move
* instructions must be programmed with corner zones. This means that move
* instructions with the same ID must either all have corner zones, or all
* have stop points. If a move instruction with a corner zone and a move
* instruction with a stop point are synchronously executed in their
* respective task program, an error will occur. Synchronously executed move
* instructions can have corner zones of different sizes (e.g. one uses z10
* and one uses z50).
*
* @param id
* @return
@ -177,9 +183,11 @@ public:
/**
* @ingroup SyncMove
* \chinese
* syncMoveUndo 用于关闭同步运动,即使不是所有其他任务程序都执行了 syncMoveUndo 指令。
* syncMoveUndo 用于关闭同步运动,即使不是所有其他任务程序都执行了
* syncMoveUndo 指令。
*
* syncMoveUndo 主要用于 UNDO 处理程序。当程序指针从过程移动时,syncMoveUndo 用于关闭同步。
* syncMoveUndo 主要用于 UNDO 处理程序。当程序指针从过程移动时,syncMoveUndo
* 用于关闭同步。
*
* @return
*
@ -215,15 +223,16 @@ public:
* \chinese
* waitSyncTasks 用于在程序中的特定点同步多个任务程序。
*
* waitSyncTasks 指令会等待其他任务程序。当所有任务程序都到达 waitSyncTasks 指令时,
* 它们将继续执行。
* waitSyncTasks 指令会等待其他任务程序。当所有任务程序都到达 waitSyncTasks
* 指令时, 它们将继续执行。
*
* @param syncident
* @param taskset
* @return
*
* @par Python函数原型
* waitSyncTasks(self: pyaubo_sdk.SyncMove, arg0: str, arg1: Set[str]) -> int
* waitSyncTasks(self: pyaubo_sdk.SyncMove, arg0: str, arg1: Set[str]) ->
* int
*
* @par Lua函数原型
* waitSyncTasks(syncident: string, taskset: table) -> nil
@ -233,16 +242,17 @@ public:
* waitSyncTasks is used to synchronize several task programs at a specific
* point in the program.
*
* A waitSyncTasks instruction will wait for the other task programs. When all
* task programs have reached the waitSyncTasks instruction, they will continue
* their execution.
* A waitSyncTasks instruction will wait for the other task programs. When
* all task programs have reached the waitSyncTasks instruction, they will
* continue their execution.
*
* @param syncident
* @param taskset
* @return
*
* @par Python prototype
* waitSyncTasks(self: pyaubo_sdk.SyncMove, arg0: str, arg1: Set[str]) -> int
* waitSyncTasks(self: pyaubo_sdk.SyncMove, arg0: str, arg1: Set[str]) ->
* int
*
* @par Lua prototype
* waitSyncTasks(syncident: string, taskset: table) -> nil
@ -267,9 +277,12 @@ public:
* isSyncMoveOn() -> boolean
* \endchinese
* \english
* isSyncMoveOn is used to tell if the mechanical unit group is in synchronized movement mode.
* isSyncMoveOn is used to tell if the mechanical unit group is in
* synchronized movement mode.
*
* A task that does not control any mechanical unit can find out if the mechanical units defined in the parameter Use Mechanical Unit Group are in synchronized movement mode.
* A task that does not control any mechanical unit can find out if the
* mechanical units defined in the parameter Use Mechanical Unit Group are
* in synchronized movement mode.
*
* @return
*
@ -339,13 +352,15 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 添加一个名为 name 的坐标系,其初始位姿为 pose,位姿以 ref_frame 坐标系表达。
* 此命令仅向世界模型添加一个坐标系,并不会将其附加到 ref_frame 坐标系。
* 如需将新添加的坐标系附加到 ref_frame,请使用 frameAttach()。
* 添加一个名为 name 的坐标系,其初始位姿为 pose,位姿以 ref_frame
* 坐标系表达。 此命令仅向世界模型添加一个坐标系,并不会将其附加到 ref_frame
* 坐标系。 如需将新添加的坐标系附加到 ref_frame,请使用 frameAttach()。
*
* @param name: 要添加的坐标系名称。名称不能与任何已存在的世界模型对象(坐标系、轴或轴组)重复,否则会抛出异常。
* @param name:
* 要添加的坐标系名称。名称不能与任何已存在的世界模型对象(坐标系、轴或轴组)重复,否则会抛出异常。
* @param pose: 新对象的初始位姿。
* @param ref_frame: 位姿所表达的参考坐标系对象名称。若未指定,默认使用机器人“base”坐标系。
* @param ref_frame:
* 位姿所表达的参考坐标系对象名称。若未指定,默认使用机器人“base”坐标系。
*
* @return
* \endchinese
@ -470,15 +485,19 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 更改名为 name 的坐标系的位置,将其移动到由 pose 指定的新位置,pose 以 ref_name 坐标系表达。
* 更改名为 name 的坐标系的位置,将其移动到由 pose 指定的新位置,pose 以
* ref_name 坐标系表达。
*
* 如果 name 为 “world”、“flange”、“tcp”,或该坐标系不存在,则操作会失败。注意:如需移动 “tcp” 坐标系,请使用 set_tcp() 命令。
* 如果 name 为
* “world”、“flange”、“tcp”,或该坐标系不存在,则操作会失败。注意:如需移动
* “tcp” 坐标系,请使用 set_tcp() 命令。
*
* 如果用于 MotionPlus,ref_name 参数可以是外部轴或轴组的名称。
*
* @param name: 要移动的坐标系名称
* @param pose: 新的位置
* @param ref_name: pose 所表达的参考坐标系,默认值为机器人的 “base” 坐标系。
* @param ref_name: pose 所表达的参考坐标系,默认值为机器人的 “base”
* 坐标系。
*
* @return
* \endchinese
@ -507,8 +526,9 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 获取名为 name 的坐标系相对于 rel_frame 坐标系的位姿,并以 ref_frame 坐标系表达。
* 如果未提供 ref_frame,则返回 name 坐标系相对于 rel_frame 坐标系的位姿,并以 rel_frame 坐标系表达。
* 获取名为 name 的坐标系相对于 rel_frame 坐标系的位姿,并以 ref_frame
* 坐标系表达。 如果未提供 ref_frame,则返回 name 坐标系相对于 rel_frame
* 坐标系的位姿,并以 rel_frame 坐标系表达。
*
* 如果任一参数不是已存在的坐标系,则操作会失败。
*
@ -516,7 +536,9 @@ public:
*
* @param name: 要查询的坐标系名称。
* @param rel_frame: “相对坐标系”,用于计算相对位姿的坐标系。
* @param ref_frame: “参考坐标系”,用于表达结果相对位姿的坐标系。如果未提供,则默认为 rel_frame。
* @param ref_frame:
* “参考坐标系”,用于表达结果相对位姿的坐标系。如果未提供,则默认为
* rel_frame。
*
* @return 以 ref_frame 坐标系表达的 name 坐标系的位姿。
* \endchinese
@ -650,7 +672,29 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 向世界模型添加一个新的轴组,名称为 name。轴组基座放置在 ref_frame 坐标系下的 pose 位置。
* 设置轴组协同运动使用的工件数据,并基于当前机器人和外部轴实际状态重新初始化规划器。
* 每次调用都会重新初始化规划器,即使 wobj 与当前工件数据相同。
*
* @param wobj 工件数据。
* @return 成功返回 0,失败返回负错误码。
* \endchinese
* \english
* Sets the work object data for coordinated axis-group motion and
* reinitializes the planner from the current robot and external-axis
* states. Every call reinitializes the planner, even if wobj matches the
* current work object data.
*
* @param wobj Work object data.
* @return 0 on success, or a negative error code on failure.
* \endenglish
*/
int axisGroupSetWorkpiece(const WObjectData &wobj);
/**
* @ingroup SyncMove
* \chinese
* 向世界模型添加一个新的轴组,名称为 name。轴组基座放置在 ref_frame
* 坐标系下的 pose 位置。
*
* 轴组只能附加到世界坐标系。
*
@ -658,9 +702,12 @@ public:
*
* 世界模型最多可添加 6 个轴组。
*
* @param name: 要添加的轴组名称,不能为空字符串。世界模型对象(如坐标系、轴组、轴等)的名称必须唯一。
* @param name:
* 要添加的轴组名称,不能为空字符串。世界模型对象(如坐标系、轴组、轴等)的名称必须唯一。
* @param pose: 轴组基座在参考坐标系下的位姿。
* @param ref_frame (可选): pose 所在的参考坐标系名称,可以是任何带有坐标系的世界模型实体(如坐标系、轴组、轴等)。默认值 "base" 表示机器人基座坐标系。
* @param ref_frame (可选): pose
* 所在的参考坐标系名称,可以是任何带有坐标系的世界模型实体(如坐标系、轴组、轴等)。默认值
* "base" 表示机器人基座坐标系。
*
* @return
* \endchinese
@ -713,7 +760,8 @@ public:
*
* All attached axes are also disabled (if live) and deleted.
*
* This function will fail, if this axis group is under control by another function.
* This function will fail, if this axis group is under control by another
* function.
*
* @param name: (string) Name of the axis group to delete. Axis group with
* such name must exist.
@ -726,37 +774,51 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 向名为 group_name 的轴组添加一个名为 name 的外部轴。该轴在 parent 坐标系下的 pose 位置附加,pose 表示轴位置为 0 时的位姿。
* 轴的类型、最大速度、最大加速度、位置限制和索引分别由 type、v_limit、a_limit、q_limits 和 axis_index 定义。
* pose 参数通常通过外部轴调试标定流程获得。
* 向名为 group_name 的轴组添加一个名为 name 的外部轴。
* axisGroupAddAxis 的调用顺序定义轴和模型顺序。第一根轴的 parent
* 必须等于 group_name,后续每根轴的 parent 必须等于紧邻的前一根轴名称。
* parent 仅用于校验严格父子链和拓扑,不对 pose 做坐标变换。pose
* 为该轴的标定几何:直线轴使用 robot base 下有限 3D
* 单位方向,旋转轴使用 robot base 下有限绝对 6D `T_b_axis`。
* 启用轴组时,轴类型和限位取自已加载的 AxisInterface。pose
* 参数通常通过外部轴调试标定流程获得。
* 如果该轴组正被其他函数控制,或附加关系形成闭环,则操作会失败。
*
* @param group_name: 要添加轴的轴组名称,需已通过 axis_group_add() 创建且存在。
* @param group_name: 要添加轴的轴组名称,需已通过 axisGroupAdd()
* 创建且存在。
* @param name: 新轴的名称,不能为空且需唯一。
* @param parent: 父轴名称,若为空或与 group_name 相同,则附加到轴组基座。父轴需已存在于该轴组。
* @param pose: 轴在父坐标系下的零位姿。type 为 0(旋转轴)时,z 轴为旋转轴;type 为 1(直线轴)时,z 轴为移动方向。
* @param type: 轴类型,0 表示旋转轴,1 表示直线轴。
* @param v_limit: 最大速度。
* @param a_limit: 最大加速度。
* @param q_limits: 位置限制。
* @param axis_index: 轴索引。
* @param parent: 必须满足上述严格父子链约束;仅校验拓扑,不变换 pose。
* @param pose: 轴标定几何。直线轴为 robot base 下有限 3D
* 单位方向;旋转轴为 robot base 下有限绝对 6D `T_b_axis`。
* \endchinese
* \english
* Adds an external axis with the given name to the axis group named group_name.
* The axis is attached at the given pose in the reference coordinate frame defined by parent when its axis position is 0.
* The type, max velocity, max acceleration, position limits, and index of this axis are defined by type, v_limit, a_limit, q_limits, and axis_index, respectively.
* The pose parameter is typically obtained from a calibration process when the external axis is commissioned.
* This function will fail if this axis group is under control of another function, or if the kinematic chain created by the attachment forms a closed chain.
* Adds an external axis with the given name to the axis group named
* group_name. The axisGroupAddAxis call order defines axis and model order.
* The first axis parent must equal group_name, and each later axis parent
* must equal the immediately preceding axis name. Parent validates only
* this strict chain/topology and does not transform pose. Pose stores
* calibrated geometry: a linear axis uses a finite 3D unit direction in
* robot base, while a rotary axis uses a finite absolute 6D `T_b_axis` in
* robot base. When the axis group is enabled, axis type and limits are read
* from the loaded AxisInterface. The pose parameter is typically
* obtained from a calibration process when the external axis is
* commissioned. This function will fail if this axis group is under control
* of another function, or if the kinematic chain created by the attachment
* forms a closed chain.
*
* @param group_name: Name of the axis group this new axis is added to. The axis group would have been created using axis_group_add(). Axis group with such name must exist.
* @param name: Name of the new axis. The name cannot be an empty string. Names used by world model objects (e.g., frame, axis group, axis, etc.) must be unique.
* @param parent: Name of the parent axis. If it’s empty or the same as group_name, the new axis will be attached to the base of the axis group. Axis with such name must exist in the axis group.
* @param pose: The zero-position pose, in the parent coordinate frame, this axis will be placed and attached to. This is the pose the axis will be (relative to its parent) when its axis position is 0. If type is 0 (rotary), then the z axis of the frame corresponds to the axis of rotation. If type is 1 (linear), then the z axis is the axis of translation.
* @param type: Axis type, 0 for rotary, 1 for linear.
* @param v_limit: Maximum velocity.
* @param a_limit: Maximum acceleration.
* @param q_limits: Position limits.
* @param axis_index: Axis index.
* @param group_name: Name of the axis group this new axis is added to. The
* axis group would have been created using axisGroupAdd(). Axis group
* with such name must exist.
* @param name: Name of the new axis. The name cannot be an empty string.
* Names used by world model objects (e.g., frame, axis group, axis, etc.)
* must be unique.
* @param parent: Parent name. The first axis parent must equal group_name;
* each later axis parent must equal the immediately preceding axis name.
* Parent validates the strict chain/topology only and does not transform
* pose.
* @param pose: Calibrated axis geometry. A linear axis uses a finite 3D
* unit direction in robot base; a rotary axis uses a finite absolute 6D
* `T_b_axis` in robot base.
* \endenglish
*/
int axisGroupAddAxis(const std::string &group_name, const std::string &name,
@ -766,18 +828,18 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 更新指定名称的轴的相关属性。pose 参数通常通过外部轴调试标定流程获得。
* 更新指定名称的轴的相关属性。pose 更新与 axisGroupAddAxis
* 相同的标定字段,参数通常通过外部轴调试标定流程获得。
* 如果该轴所属的轴组正被其他命令控制,则操作会失败。
* 如果该轴组中任何已附加的轴处于激活和使能状态,则操作会失败。
*
* @param name: 要更新的轴的名称,需已存在。
* @param pose (可选): 轴在父轴(或轴组)坐标系下的零位姿。即轴位置为 0 时的位姿。
* \endchinese
* \english
* Updates the corresponding properties of axis with name. The pose
* parameter is typically obtained from a calibration process when the
* external axis is commissioned. See here for a guide on a basic routine
* for calibrating a single rotary axis.
* @param pose: 直线轴为 robot base 下有限 3D 单位方向;旋转轴为
* robot base 下有限绝对 6D `T_b_axis`。 \endchinese \english Updates the
* corresponding properties of axis with name. Pose updates the same
* calibrated field as axisGroupAddAxis and is typically obtained from a
* calibration process when the external axis is commissioned. See here for
* a guide on a basic routine for calibrating a single rotary axis.
*
* This function will fail, if the axis group the axis attached to is
* already being controlled by another command.
@ -787,9 +849,9 @@ public:
* @param name: (string) Name of the axis to update. Axis with such name
* must exist.
*
* @param pose (optional): (pose) New zero-position pose, in the coordinate
* frame of the parent axis (or axis group), of the axis. This is the pose
* of the axis when its axis position is 0.
* @param pose: For a linear axis, a finite 3D unit direction in
* robot base. For a rotary axis, a finite absolute 6D `T_b_axis` in robot
* base.
* \endenglish
*/
int axisGroupUpdateAxis(const std::string &name,
@ -845,7 +907,8 @@ public:
*
* 如果外部轴总线被禁用,则该函数会失败。
*
* @param group_name (可选): (string) 要查询的轴组名称。该名称的轴组必须真实存在。
* @param group_name (可选): (string)
* 要查询的轴组名称。该名称的轴组必须真实存在。
*
* @return Double[]: 涉及轴的目标位置,顺序为其外部轴索引顺序。
* \endchinese
@ -874,7 +937,8 @@ public:
*
* 如果外部轴总线被禁用,则该函数会失败。
*
* @param group_name (可选): (string) 要查询的轴组名称。该名称的轴组必须真实存在。
* @param group_name (可选): (string)
* 要查询的轴组名称。该名称的轴组必须真实存在。
*
* @return Double[]: 涉及轴的实际位置,顺序为其外部轴索引顺序。
* \endchinese
@ -900,11 +964,13 @@ public:
* \chinese
* 通过给定的 offset,将轴组 group_name 的目标位置和实际位置整体偏移。
*
* 这是一个仅在控制器内部进行的软件偏移,不会影响外部轴驱动器。该偏移也会应用于通过 RTDE 发布的任何目标和实际位置流。
* 这是一个仅在控制器内部进行的软件偏移,不会影响外部轴驱动器。该偏移也会应用于通过
* RTDE 发布的任何目标和实际位置流。
*
* @param group_name: (string) 要应用偏移的轴组名称。该名称的轴组必须存在。
*
* @param offset: (float[]) 目标和实际位置需要整体偏移的量。offset 的大小必须与该轴组所包含的轴数量一致。
* @param offset: (float[]) 目标和实际位置需要整体偏移的量。offset
* 的大小必须与该轴组所包含的轴数量一致。
*
* @return
* \endchinese
@ -939,9 +1005,13 @@ public:
* 实际的加速度和速度由最受限制的轴决定,以确保所有轴在加速、匀速和减速阶段同时完成。
*
* @param group_name: (string) 要移动的轴组名称。该名称的轴组必须存在。
* @param q: (float[]) 目标位置,旋转轴为弧度,直线轴为米。如果目标超出位置极限,则会被限制在最近的极限值。涉及的轴按其索引递增排序。q 的大小必须与该轴组包含的轴数量一致。
* @param a: (float) 本次运动的最大加速度因子,取值范围 (0,1],表示占加速度极限的百分比。
* @param v: (float) 本次运动的最大速度因子,取值范围 (0,1],表示占速度极限的百分比。
* @param q: (float[])
* 目标位置,旋转轴为弧度,直线轴为米。如果目标超出位置极限,则会被限制在最近的极限值。涉及的轴按其索引递增排序。q
* 的大小必须与该轴组包含的轴数量一致。
* @param a: (float) 本次运动的最大加速度因子,取值范围
* (0,1],表示占加速度极限的百分比。
* @param v: (float) 本次运动的最大速度因子,取值范围
* (0,1],表示占速度极限的百分比。
*
* 返回值: 无
* \endchinese
@ -979,12 +1049,17 @@ public:
/**
* @ingroup SyncMove
* \chinese
* 以指定的加速度因子 a,将名为 group_name 的轴组加速到目标速度 qd。该函数会运行 t 秒。
* 以指定的加速度因子 a,将名为 group_name 的轴组加速到目标速度
* qd。该函数会运行 t 秒。
* @param group_name: (string) 要控制的外部轴组名称,必须已存在。
* @param qd: (float[]) 轴组各轴的目标速度。如果目标速度超过速度极限,则会被限制在极限值。涉及的轴按其索引递增排序。qd 的大小必须与该轴组包含的轴数量一致。
* @param a: (float) 本次运动的最大加速度因子,取值范围 (0,1],表示占加速度极限的百分比。
* @param t (可选): (float) 函数运行的持续时间(秒)。若 t < 0,则函数将在目标速度达到时返回;若 t ≥ 0,则函数将在该持续时间后返回,无论实际速度是否达到目标值。
* \endchinese
* @param qd: (float[])
* 轴组各轴的目标速度。如果目标速度超过速度极限,则会被限制在极限值。涉及的轴按其索引递增排序。qd
* 的大小必须与该轴组包含的轴数量一致。
* @param a: (float) 本次运动的最大加速度因子,取值范围
* (0,1],表示占加速度极限的百分比。
* @param t (可选): (float) 函数运行的持续时间(秒)。若 t <
* 0,则函数将在目标速度达到时返回;若 t ≥
* 0,则函数将在该持续时间后返回,无论实际速度是否达到目标值。 \endchinese
* \english
* Accelerates the axes of axis group named group_name up to the target
* velocities qd. Factor a specifying the percentage of the max

View File

@ -50,10 +50,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionCode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":28003}
* @endcode
*
* \endchinese
* \english
@ -74,10 +78,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionCode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":28003}
* @endcode
*
* \endenglish
*/
@ -103,10 +111,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareFullVersion","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"0.31.0-alpha.16+20alc76"}
* @endcode
*
* \endchinese
* \english
@ -127,10 +139,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareFullVersion","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"0.31.0-alpha.16+20alc76"}
* @endcode
*
* \endenglish
*/
@ -156,10 +172,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getInterfaceVersionCode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":22003}
* @endcode
*
* \endchinese
* \english
@ -180,10 +200,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getInterfaceVersionCode","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":22003}
* @endcode
*
* \endenglish
*/
@ -209,10 +233,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareBuildDate","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"2024-3-5 07:03:20"}
* @endcode
*
* \endchinese
* \english
@ -233,10 +261,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareBuildDate","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"2024-3-5 07:03:20"}
* @endcode
*
* \endenglish
*/
@ -262,10 +294,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionHash","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"fa4f64a"}
* @endcode
*
* \endchinese
* \english
@ -286,10 +322,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionHash","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":"fa4f64a"}
* @endcode
*
* \endenglish
*/
@ -315,10 +355,14 @@ public:
* @endcode
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSystemTime","params":[],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":9287799079682}
* @endcode
*
* \endchinese
* \english
@ -339,10 +383,14 @@ public:
* @endcode
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSystemTime","params":[],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":9287799079682}
* @endcode
*
* \endenglish
*/

View File

@ -58,11 +58,14 @@ public:
* alarm(level: number, code: number, args: table) -> nil
*
* \~chinese @par JSON-RPC请求示例 \~english @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"rob1.Trace.alarm","params":["",1,["Error","Trajectory
* planning failed!","1"]],"id":1}
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.alarm","params":["",1,["Error","Trajectory planning failed!","1"]],"id":1}
* @endcode
*
* \~chinese @par JSON-RPC响应示例 \~engish @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
*
*/
int alarm(TraceLevel level, int code,
@ -83,10 +86,14 @@ public:
* textmsg(msg: string) -> nil
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.textmsg","params":["test"],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* print message into log
@ -101,10 +108,14 @@ public:
* textmsg(msg: string) -> nil
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.textmsg","params":["test"],"id":1}
* @endcode
*
* @par JSON-RPC responose example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int textmsg(const std::string &msg);
@ -142,11 +153,14 @@ public:
* popup(level: number, title: string, msg: string, mode: number) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"rob1.Trace.popup","params":["","Error","Trajectory
* planning failed!",1],"id":1}
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.popup","params":["","Error","Trajectory planning failed!",1],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endchinese
* \english
* Send a popup request to the connected RTDE client
@ -171,11 +185,14 @@ public:
* popup(level: number, title: string, msg: string, mode: number) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"rob1.Trace.popup","params":["","Error","Trajectory
* planning failed!",1],"id":1}
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.popup","params":["","Error","Trajectory planning failed!",1],"id":1}
* @endcode
*
* @par JSON-RPC response example
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":0}
* @endcode
* \endenglish
*/
int popup(TraceLevel level, const std::string &title,
@ -200,11 +217,15 @@ public:
* peek(num: number, last_time: number) -> table
*
* @par JSON-RPC请求示例
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.peek","params":[1,0],"id":1}
* @endcode
*
* @par JSON-RPC响应示例
* {{"id":1,"jsonrpc":"2.0","result":[{"args":["RobotModeType.Running"],
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[{"args":["RobotModeType.Running"],
* "code":30045,"level":"INFO","source":"rob1","timestamp":5102883064300}]}
* @endcode
* \endchinese
* \english
* peek the latest AlarmInfo (after the last retrieval)
@ -223,11 +244,15 @@ public:
* peek(num: number, last_time: number) -> table
*
* @par JSON-RPC request example
* @code{.json}
* {"jsonrpc":"2.0","method":"rob1.Trace.peek","params":[1,0],"id":1}
* @endcode
*
* @par JSON-RPC response example
* {{"id":1,"jsonrpc":"2.0","result":[{"args":["RobotModeType.Running"],
* @code{.json}
* {"id":1,"jsonrpc":"2.0","result":[{"args":["RobotModeType.Running"],
* "code":30045,"level":"INFO","source":"rob1","timestamp":5102883064300}]}
* @endcode
* \endenglish
*/
RobotMsgVector peek(size_t num, uint64_t last_time = 0);

View File

@ -193,15 +193,14 @@ struct WObjectData
/// coordinate system
std::string attach_frame{ "" };
/// \~english User coordinate system. \~chinese 用户坐标系
/// \~chinese 如果 robhold 为 false, 那 uframe 的数值是基于 world \~english
/// If robhold is false, the values of uframe are based on world.
/// \~chinese 否则,uframe 的数值是基于 flange \~english Otherwise, the
/// values of uframe are based on flange.
/// \~chinese 用户坐标系位姿。remote_tool 为 false 时相对于 world 表达,
/// 为 true 时相对于 flange 表达。
/// \~english User-frame pose. Expressed in the world frame when
/// remote_tool is false, and in the flange frame when it is true.
std::vector<double> user_coord{ std::vector<double>(6, 0) };
/// \~chinese 工件坐标系,基于 uframe \~english tool coordinate system,
/// based on uframe
/// \~chinese 工件坐标系位姿,相对于 user_coord 表达。
/// \~english Work-object frame pose, expressed in user_coord.
std::vector<double> obj_coord{ std::vector<double>(6, 0) };
};
@ -571,6 +570,13 @@ inline std::ostream &operator<<(std::ostream &os, const VibrationRecalibrationPa
ENUM_ITEM(StandardAnalogInput, 9, "标准模拟输入IO") \
ENUM_ITEM(ToolAnalogInput, 10, "工具端模拟输入IO")
#define ENUM_HandleProgramState_DECLARES \
ENUM_ITEM(None, 0, "无触发") \
ENUM_ITEM(Start, 1, "触发启动程序") \
ENUM_ITEM(Pause, 2, "触发暂停程序") \
ENUM_ITEM(Resume, 3, "触发恢复程序") \
ENUM_ITEM(Stop, 4, "触发停止程序")
#define ENUM_ITEM(c, n, ...) c = n,
enum AuboErrorCodes : int
{
@ -703,6 +709,11 @@ enum RobotIOType : int
{
ENUM_RobotIOType_DECLARES
};
enum class HandleProgramState : int
{
ENUM_HandleProgramState_DECLARES
};
#undef ENUM_ITEM
#define DECL_TO_STRING_FUNC(ENUM) \
@ -742,6 +753,7 @@ DECL_TO_STRING_FUNC(TraceLevel)
DECL_TO_STRING_FUNC(HandleModeType)
DECL_TO_STRING_FUNC(HandleStateType)
DECL_TO_STRING_FUNC(RobotIOType)
DECL_TO_STRING_FUNC(HandleProgramState)
#undef ENUM_ITEM
@ -827,6 +839,55 @@ inline std::ostream &operator<<(std::ostream &os, TrajConfig p)
return os;
}
/// \~chinese 传送带快速标定结果 \~english Conveyor quick-calibration result
struct ConveyorCalibResult
{
/// \~chinese 直线方向 [dx,dy,dz,0,0,0],或圆心坐标系 6D 位姿
/// [x,y,z,rx,ry,rz](位置单位米,姿态为 ZYX RPY、单位弧度)
/// \~english Line direction [dx,dy,dz,0,0,0], or circular-center frame
/// pose [x,y,z,rx,ry,rz] (position in metres and ZYX RPY in radians)
std::vector<double> track_ref;
/// \~chinese 每米或每弧度的编码器计数 \~english Encoder ticks per metre
/// or radian
int tick_per_unit{ 0 };
/// \~chinese 跟随上限,直线单位米、圆形单位弧度 \~english Tracking
/// limit, in metres for linear or radians for circular conveyors
double limit{ 0 };
/// \~chinese 启动窗口起点,直线单位米、圆形单位弧度 \~english Start-
/// window minimum, in metres for linear or radians for circular conveyors
double window_min{ 0 };
/// \~chinese 启动窗口终点,直线单位米、圆形单位弧度 \~english Start-
/// window maximum, in metres for linear or radians for circular conveyors
double window_max{ 0 };
/// \~chinese 光电开关到示教参考点的偏移,直线单位米、圆形单位弧度;
/// 快速标定时等于 window_min
/// \~english Sensor-to-taught-reference offset, in metres for linear or
/// radians for circular conveyors; equal to window_min in quick calibration
double sensor_offset{ 0 };
/// \~chinese 工作区长度,直线单位米、圆形单位弧度 \~english Workspace
/// length, in metres for linear or radians for circular conveyors
double work_length{ 0 };
/// \~chinese 0 表示成功,负数表示失败 \~english 0 on success, negative
/// on failure
int error_code{ 0 };
bool operator==(const ConveyorCalibResult &o) const
{
return track_ref == o.track_ref &&
tick_per_unit == o.tick_per_unit && limit == o.limit &&
window_min == o.window_min && window_max == o.window_max &&
sensor_offset == o.sensor_offset &&
work_length == o.work_length && error_code == o.error_code;
}
};
inline std::ostream &operator<<(std::ostream &os,
const ConveyorCalibResult &result)
{
(void)result;
return os;
}
// result with error code
using ResultWithErrno = std::tuple<std::vector<double>, int>;
using ResultWithErrno1 = std::tuple<std::vector<std::vector<double>>, int>;

View File

@ -32,6 +32,10 @@ ARCS_ABI int setDoubleOutput(REGISTER_CONTROL_HANDLER h, uint32_t address,
ARCS_ABI int16_t getInt16Register(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setInt16Register(REGISTER_CONTROL_HANDLER h, uint32_t address,
int16_t value);
ARCS_ABI BOOL getInt16RegisterBit(REGISTER_CONTROL_HANDLER h, uint32_t address,
uint8_t bit_offset);
ARCS_ABI int setInt16RegisterBit(REGISTER_CONTROL_HANDLER h, uint32_t address,
uint8_t bit_offset, BOOL value);
ARCS_ABI BOOL variableUpdated(REGISTER_CONTROL_HANDLER h, const char *key,
uint64_t since);
ARCS_ABI BOOL hasNamedVariable(REGISTER_CONTROL_HANDLER h, const char *key);
@ -99,11 +103,22 @@ ARCS_ABI int modbusSetOutputRunstate(REGISTER_CONTROL_HANDLER h,
const char *robot_name,
const char *signal_name,
StandardOutputRunState_C runstate);
ARCS_ABI int modbusSetOutputRunstate1(
REGISTER_CONTROL_HANDLER h, const char *robot_name, const char *signal_name,
StandardOutputRunState_C runstate, const char *object_name,
double threshold);
ARCS_ABI int modbusSetOutputSignal(REGISTER_CONTROL_HANDLER h,
const char *signal_name, uint16_t value);
/* values[0]为数量(1-123),后续为数据。 */
ARCS_ABI int modbusSetOutputSignal1(REGISTER_CONTROL_HANDLER h,
const char *signal_name,
const uint16_t *values);
ARCS_ABI int modbusSetOutputSignalPulse(REGISTER_CONTROL_HANDLER h,
const char *signal_name, uint16_t value,
double duration);
ARCS_ABI int modbusSetOutputSignalWithTimeout(REGISTER_CONTROL_HANDLER h,
const char *signal_name,
uint16_t value, double timeout);
ARCS_ABI int modbusSetSignalUpdateFrequency(REGISTER_CONTROL_HANDLER h,
const char *signal_name,
int update_frequency);

View File

@ -106,6 +106,19 @@ ARCS_ABI int getEncDecoderType(IO_CONTROL_HANDLER h);
ARCS_ABI int getEncTickCount(IO_CONTROL_HANDLER h);
ARCS_ABI int unwindEncDeltaTickCount(IO_CONTROL_HANDLER h, int delta_count);
ARCS_ABI BOOL getToolButtonStatus(IO_CONTROL_HANDLER h);
ARCS_ABI uint32_t getHandleIoStatus(IO_CONTROL_HANDLER h);
ARCS_ABI int getHandleType(IO_CONTROL_HANDLER h);
ARCS_ABI int setWorldZone(IO_CONTROL_HANDLER h,
const struct WorldZone_C *zone);
ARCS_ABI int deleteWorldZone(IO_CONTROL_HANDLER h, int id);
ARCS_ABI int enableWorldZone(IO_CONTROL_HANDLER h, int id, BOOL enabled);
/* 返回数量,result 用后释放。 */
ARCS_ABI int getWorldZones(IO_CONTROL_HANDLER h, struct WorldZone_C **result);
ARCS_ABI void freeWorldZones(struct WorldZone_C *result);
/* blocking_ids 用后释放。 */
ARCS_ABI int getWorldZoneState(IO_CONTROL_HANDLER h,
struct WorldZoneState_C *result);
ARCS_ABI void freeWorldZoneState(struct WorldZoneState_C *result);
#ifdef __cplusplus
}
#endif

View File

@ -9,6 +9,8 @@ ARCS_ABI double getEqradius(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setEqradius(MOTION_CONTROL_HANDLER h, double eqradius);
ARCS_ABI double getSpeedFraction(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setSpeedFraction(MOTION_CONTROL_HANDLER h, double fraction);
ARCS_ABI double getAccelerationFraction(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setAccelerationFraction(MOTION_CONTROL_HANDLER h, double fraction);
ARCS_ABI int speedFractionCritical(MOTION_CONTROL_HANDLER h, BOOL enable);
ARCS_ABI BOOL isSpeedFractionCritical(MOTION_CONTROL_HANDLER h);
ARCS_ABI BOOL isBlending(MOTION_CONTROL_HANDLER h);

View File

@ -5,12 +5,20 @@
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI ConveyorCalibResult_C calibConveyorTrack(
ROBOT_ALGORITHM_HANDLER h, int type, const double *poses, int poses_rows,
const int32_t *ticks, int ticks_count, int start_tick);
ARCS_ABI ForceSensorCalibResult_C
calibrateTcpForceSensor(ROBOT_ALGORITHM_HANDLER h, const double *forces,
int forces_rows, const double *poses, int poses_rows);
ARCS_ABI ForceSensorCalibResult_C
calibrateTcpForceSensor2(ROBOT_ALGORITHM_HANDLER h, const double *forces,
int forces_rows, const double *poses, int poses_rows);
ARCS_ABI int calibrateTcpForceSensor3(ROBOT_ALGORITHM_HANDLER h,
const double *forces, int forces_rows,
const double *poses, int poses_rows,
double mass, const double *cog,
double *result);
ARCS_ABI int payloadIdentify(ROBOT_ALGORITHM_HANDLER h,
const char *data_no_payload,
const char *data_with_payload);
@ -54,6 +62,12 @@ ARCS_ABI int inverseToolKinematics(ROBOT_ALGORITHM_HANDLER h,
double *result);
ARCS_ABI int inverseToolKinematicsAll(ROBOT_ALGORITHM_HANDLER h,
const double *pose, double **result);
ARCS_ABI int getRobotConfiguration(ROBOT_ALGORITHM_HANDLER h, const double *q,
int *result);
ARCS_ABI int needVibrationRecalib(
ROBOT_ALGORITHM_HANDLER h,
const struct VibrationRecalibrationParameter_C *param1,
const struct VibrationRecalibrationParameter_C *param2, double threshold);
ARCS_ABI int pathMovej(ROBOT_ALGORITHM_HANDLER h, const double *q1, double r1,
const double *q2, double r2, double d, double **result);
ARCS_ABI int pathBlend3Points(ROBOT_ALGORITHM_HANDLER h, int type,

View File

@ -632,6 +632,46 @@ struct TrajConfig_C
double max_acceleration; // 关节运动的最大加速度,默认值为 5.0
};
struct VibrationRecalibrationParameter_C
{
double mass;
double *cog;
int cog_count;
double *inertia;
int inertia_count;
double *points;
int points_rows;
double *stiff_section;
int stiff_section_rows;
double *stiff_param;
int stiff_param_rows;
};
struct WorldZone_C
{
int id;
BOOL enabled;
BOOL outside;
double base_vertex[3];
double opposite_vertex[3];
double margin;
double tool_radius;
double brake_margin;
int occupied_do_index;
BOOL occupied_active_high;
int permit_di_index;
BOOL permit_active_high;
};
struct WorldZoneState_C
{
BOOL any_occupied;
BOOL holding;
BOOL blocking;
int *blocking_ids;
int blocking_ids_count;
};
struct DHParam_C
{
double theta[6];
@ -698,6 +738,18 @@ struct ForceSensorCalibResult_C
double angle[6];
};
struct ConveyorCalibResult_C
{
double track_ref[6];
int tick_per_unit;
double limit;
double window_min;
double window_max;
double sensor_offset;
double work_length;
int error_code;
};
// 动力学模型m,d,k
struct DynamicsModel_C
{

View File

@ -31,6 +31,47 @@ struct JointPositions
bool finished{ false };
};
struct JointSpeeds
{
JointSpeeds() {}
JointSpeeds(const std::array<double, 7> &joint_velocities)
: qd(joint_velocities)
{
}
JointSpeeds(std::initializer_list<double> joint_velocities)
{
if (joint_velocities.size() != qd.size()) {
throw std::invalid_argument(
"Invalid number of elements in joint_velocities.");
}
std::copy(joint_velocities.begin(), joint_velocities.end(), qd.begin());
}
std::array<double, 7> qd{};
bool finished{ false };
};
struct JointCurrents
{
JointCurrents() {}
JointCurrents(const std::array<double, 7> &joint_currents)
: current(joint_currents)
{
}
JointCurrents(std::initializer_list<double> joint_currents)
{
if (joint_currents.size() != current.size()) {
throw std::invalid_argument(
"Invalid number of elements in joint_currents.");
}
std::copy(joint_currents.begin(), joint_currents.end(),
current.begin());
}
std::array<double, 7> current{};
bool finished{ false };
};
class ARCS_ABI Robot
{
public:
@ -51,6 +92,20 @@ public:
bool limit_rate = false, double cutoff_frequency = 100,
bool loop = false);
// 速度控制
void veloControl(
std::function<JointSpeeds(const RobotState &, double duration)>
control_callback,
bool limit_rate = false, double cutoff_frequency = 100,
bool loop = false);
// 电流控制
void currentControl(
std::function<JointCurrents(const RobotState &, double duration)>
control_callback,
bool limit_rate = false, double cutoff_frequency = 100,
bool loop = false);
// 实时读取机器人的状态
void read(std::function<bool(const RobotState &)> read_callback);
@ -60,9 +115,14 @@ public:
// 停止轨迹记录
int stopRecord();
// 设置控制模式
int setServoMode(int mode);
protected:
void *d_{ nullptr };
bool init_{ false };
int servo_mode_{ 1 };
int period_{ 5000 };
};
} // namespace research_interface

View File

@ -3,6 +3,7 @@
#include <QObject>
#include <mutex>
#include <vector>
#include <aubo_sdk/rpc.h>
#include <aubo_sdk/rtde.h>
@ -23,6 +24,7 @@ struct RobotInfo
std::vector<double>(9, 0.) };
std::vector<double> actual_q_{ std::vector<double>(6, 0.) };
std::vector<double> actual_qd_{ std::vector<double>(6, 0.) };
std::vector<double> actual_current_{ std::vector<double>(6, 0.) };
std::vector<double> actual_TCP_pose_{ std::vector<double>(6, 0.) };
std::vector<double> actual_TCP_speed_{ std::vector<double>(6, 0.) };

View File

@ -169,9 +169,16 @@ signals:
void popup(int robot_index, int level, const QString &title,
const QString &msg, int mode);
// 外部轴异常弹窗 要传递具体interface name
void popupAxisError(int robot_index, int level, const QString &title,
const QString &msg, int mode, const QString &name);
/// 解除弹窗信号
void popupDismiss(const QString &src);
/// 按 id 解除指定弹窗信号
void popupDismissById(int id);
/// 从控制器层上传的系统关机信号
void systemHalt(const QString &src);

View File

@ -279,6 +279,8 @@ srv/GetEqradius.srv
srv/SetEqradius.srv
srv/GetSpeedFraction.srv
srv/SetSpeedFraction.srv
srv/GetAccelerationFraction.srv
srv/SetAccelerationFraction.srv
srv/SpeedFractionCritical.srv
srv/IsSpeedFractionCritical.srv
srv/IsBlending.srv

View File

@ -0,0 +1,4 @@
---
float64 result
int32 code
string message

View File

@ -0,0 +1,5 @@
float64 fraction
---
int32 result
int32 code
string message

File diff suppressed because it is too large Load Diff

View File

@ -180,6 +180,10 @@
|R1_weave_direction|int|Get current weave trajectory direction|
|R1_handle_dev_state|int|Get handle dev state|
|R1_handle_dev_type|int|Get handle dev type|
|R1_base_chip_temperature|double|Base main chip temperature in degrees Celsius|
|R1_joint_chip_temperatures|std::vector<double>|Driver chip temperatures of each joint in degrees Celsius|
|R1_actual_TCP_pose_with_axis_group|std::vector<double>|Actual TCP pose coordinated with the enabled external axis group|
|R1_joint_gravity_torque|std::vector<double>|Joint gravity torques|
|R2_message|RobotMsg|Robot message from controller|
|R2_target_q|std::vector<double>|Target joint positions|
|R2_target_qd|std::vector<double>|Target joint velocities|
@ -260,6 +264,10 @@
|R2_weave_direction|int|Get current weave trajectory direction|
|R2_handle_dev_state|int|Get handle dev state|
|R2_handle_dev_type|int|Get handle dev type|
|R2_base_chip_temperature|double|Base main chip temperature in degrees Celsius|
|R2_joint_chip_temperatures|std::vector<double>|Driver chip temperatures of each joint in degrees Celsius|
|R2_actual_TCP_pose_with_axis_group|std::vector<double>|Actual TCP pose coordinated with the enabled external axis group|
|R2_joint_gravity_torque|std::vector<double>|Joint gravity torques|
|R3_message|RobotMsg|Robot message from controller|
|R3_target_q|std::vector<double>|Target joint positions|
|R3_target_qd|std::vector<double>|Target joint velocities|
@ -340,6 +348,10 @@
|R3_weave_direction|int|Get current weave trajectory direction|
|R3_handle_dev_state|int|Get handle dev state|
|R3_handle_dev_type|int|Get handle dev type|
|R3_base_chip_temperature|double|Base main chip temperature in degrees Celsius|
|R3_joint_chip_temperatures|std::vector<double>|Driver chip temperatures of each joint in degrees Celsius|
|R3_actual_TCP_pose_with_axis_group|std::vector<double>|Actual TCP pose coordinated with the enabled external axis group|
|R3_joint_gravity_torque|std::vector<double>|Joint gravity torques|
|R4_message|RobotMsg|Robot message from controller|
|R4_target_q|std::vector<double>|Target joint positions|
|R4_target_qd|std::vector<double>|Target joint velocities|
@ -420,3 +432,7 @@
|R4_weave_direction|int|Get current weave trajectory direction|
|R4_handle_dev_state|int|Get handle dev state|
|R4_handle_dev_type|int|Get handle dev type|
|R4_base_chip_temperature|double|Base main chip temperature in degrees Celsius|
|R4_joint_chip_temperatures|std::vector<double>|Driver chip temperatures of each joint in degrees Celsius|
|R4_actual_TCP_pose_with_axis_group|std::vector<double>|Actual TCP pose coordinated with the enabled external axis group|
|R4_joint_gravity_torque|std::vector<double>|Joint gravity torques|

View File

@ -14,216 +14,219 @@ using namespace arcs::aubo_sdk;
#endif
// 关节示教
void exampleSpeedJoint(RpcClientPtr impl) {
// 接口调用: 获取机器人的名字
auto robot_name = impl->getRobotNames().front();
auto robot_interface = impl->getRobotInterface(robot_name);
void exampleSpeedJoint(RpcClientPtr impl)
{
// 接口调用: 获取机器人的名字
auto robot_name = impl->getRobotNames().front();
auto robot_interface = impl->getRobotInterface(robot_name);
// 接口调用: 设置机械臂的速度比率
robot_interface->getMotionControl()->setSpeedFraction(0.3);
// 接口调用: 设置机械臂的速度比率
robot_interface->getMotionControl()->setSpeedFraction(0.3);
// 输入字符串
std::string input_angle;
// 定义输入字符串和键值映射
std::map<std::string, int> keymap;
keymap["j1+"] = 1;
keymap["j1-"] = 2;
keymap["j2+"] = 3;
keymap["j2-"] = 4;
keymap["j3+"] = 5;
keymap["j3-"] = 6;
keymap["j4+"] = 7;
keymap["j4-"] = 8;
keymap["j5+"] = 9;
keymap["j5-"] = 10;
keymap["j6+"] = 11;
keymap["j6-"] = 12;
keymap["s"] = 13;
keymap["exit"] = 14;
// 输入字符串
std::string input_angle;
// 定义输入字符串和键值映射
std::map<std::string, int> keymap;
keymap["j1+"] = 1;
keymap["j1-"] = 2;
keymap["j2+"] = 3;
keymap["j2-"] = 4;
keymap["j3+"] = 5;
keymap["j3-"] = 6;
keymap["j4+"] = 7;
keymap["j4-"] = 8;
keymap["j5+"] = 9;
keymap["j5-"] = 10;
keymap["j6+"] = 11;
keymap["j6-"] = 12;
keymap["s"] = 13;
keymap["exit"] = 14;
// 初始化循环控制变量
bool continue_loop = true;
// 初始化循环控制变量
bool continue_loop = true;
// speedJoint速度
double speed = 0.2;
// speedJoint速度
double speed = 0.2;
int cnt = 0;
while (continue_loop) {
std::cout << "请输入机械臂要运动的关节角: " << std::endl;
// 显示有效输入提示
if (cnt++ == 0) {
std::cout << "有效输入值如下: "
"j1+、j1-、j2+、j2-、j3+、j3-、j4+、j4-、j5+、j5-、j6+"
"、j6-、s、exit"
<< std::endl;
std::cout << "j1+表示关节1正方向,j1-表示关节1负方向,j2+"
"表示关节2正方向,j2-"
"表示关节2负方向,j3+表示关节3正方向,j3-"
",表示关节3负方向,j4+"
"表示关节4正方向,j4-表示关节4负方向,j5+"
"表示关节5正方向,j5-"
"表示关节5负方向,j6+表示关节6正方向,j6-"
"表示关节6负方向,s表示停止运动,exit表示退出循环"
<< std::endl;
int cnt = 0;
while (continue_loop) {
std::cout << "请输入机械臂要运动的关节角: " << std::endl;
// 显示有效输入提示
if (cnt++ == 0) {
std::cout << "有效输入值如下: "
"j1+、j1-、j2+、j2-、j3+、j3-、j4+、j4-、j5+、j5-、j6+"
"、j6-、s、exit"
<< std::endl;
std::cout << "j1+表示关节1正方向,j1-表示关节1负方向,j2+"
"表示关节2正方向,j2-"
"表示关节2负方向,j3+表示关节3正方向,j3-"
",表示关节3负方向,j4+"
"表示关节4正方向,j4-表示关节4负方向,j5+"
"表示关节5正方向,j5-"
"表示关节5负方向,j6+表示关节6正方向,j6-"
"表示关节6负方向,s表示停止运动,exit表示退出循环"
<< std::endl;
}
std::cin >> input_angle;
char value = keymap[input_angle];
switch (value) {
case 1: {
std::vector<double> qd = { speed, 0.0, 0.0, 0.0, 0.0, 0.0 };
// 接口调用: 机械臂的关节1沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 2: {
std::vector<double> qd = { speed * (-1), 0.0, 0.0, 0.0, 0.0, 0.0 };
// 接口调用: 机械臂的关节1沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 3: {
std::vector<double> qd = { 0.0, speed, 0.0, 0.0, 0.0, 0.0 };
// 接口调用: 机械臂的关节2沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 4: {
std::vector<double> qd = { 0.0, speed * (-1), 0.0, 0.0, 0.0, 0.0 };
// 接口调用: 机械臂的关节2沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 5: {
std::vector<double> qd = { 0.0, 0.0, speed, 0.0, 0.0, 0.0 };
// 接口调用: 机械臂的关节3沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 6: {
std::vector<double> qd = { 0.0, 0.0, speed * (-1), 0.0, 0.0, 0.0 };
// 接口调用: 机械臂的关节3沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 7: {
std::vector<double> qd = { 0.0, 0.0, 0.0, speed, 0.0, 0.0 };
// 接口调用: 机械臂的关节4沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 8: {
std::vector<double> qd = { 0.0, 0.0, 0.0, speed * (-1), 0.0, 0.0 };
// 接口调用: 机械臂的关节4沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 9: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, speed, 0.0 };
// 接口调用: 机械臂的关节5沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 10: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, speed * (-1), 0.0 };
// 接口调用: 机械臂的关节5沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 11: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, 0.0, speed };
// 接口调用: 机械臂的关节6沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 12: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, 0.0, speed * (-1) };
// 接口调用: 机械臂的关节6沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 13: {
// 接口调用: 停止关节速度跟随运动
robot_interface->getMotionControl()->stopJoint(31);
break;
}
case 14: {
// 退出循环
continue_loop = false;
break;
}
default: {
std::cerr << "输入值无效" << std::endl;
std::cerr << "以下为有效输入值: "
"j1+、j1-、j2+、j2-、j3+、j3-、j4+、j4-、j5+、j5-、j6+"
"、j6-、s、exit"
<< std::endl;
}
}
}
std::cin >> input_angle;
char value = keymap[input_angle];
switch (value) {
case 1: {
std::vector<double> qd = {speed, 0.0, 0.0, 0.0, 0.0, 0.0};
// 接口调用: 机械臂的关节1沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 2: {
std::vector<double> qd = {speed * (-1), 0.0, 0.0, 0.0, 0.0, 0.0};
// 接口调用: 机械臂的关节1沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 3: {
std::vector<double> qd = {0.0, speed, 0.0, 0.0, 0.0, 0.0};
// 接口调用: 机械臂的关节2沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 4: {
std::vector<double> qd = {0.0, speed * (-1), 0.0, 0.0, 0.0, 0.0};
// 接口调用: 机械臂的关节2沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 5: {
std::vector<double> qd = {0.0, 0.0, speed, 0.0, 0.0, 0.0};
// 接口调用: 机械臂的关节3沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 6: {
std::vector<double> qd = {0.0, 0.0, speed * (-1), 0.0, 0.0, 0.0};
// 接口调用: 机械臂的关节3沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 7: {
std::vector<double> qd = {0.0, 0.0, 0.0, speed, 0.0, 0.0};
// 接口调用: 机械臂的关节4沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 8: {
std::vector<double> qd = {0.0, 0.0, 0.0, speed * (-1), 0.0, 0.0};
// 接口调用: 机械臂的关节4沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 9: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, speed, 0.0};
// 接口调用: 机械臂的关节5沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 10: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, speed * (-1), 0.0};
// 接口调用: 机械臂的关节5沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 11: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, 0.0, speed};
// 接口调用: 机械臂的关节6沿着正方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 12: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, 0.0, speed * (-1)};
// 接口调用: 机械臂的关节6沿着负方向运动
robot_interface->getMotionControl()->speedJoint(qd, 1.5, 100);
break;
}
case 13: {
// 接口调用: 停止关节速度跟随运动
robot_interface->getMotionControl()->stopJoint(31);
break;
}
case 14: {
// 退出循环
continue_loop = false;
break;
}
default: {
std::cerr << "输入值无效" << std::endl;
std::cerr << "以下为有效输入值: "
"j1+、j1-、j2+、j2-、j3+、j3-、j4+、j4-、j5+、j5-、j6+"
"、j6-、s、exit"
<< std::endl;
}
}
}
}
// 在基坐标系下的位置姿态示教
void exampleSpeedLine(RpcClientPtr impl) {
// 接口调用: 获取机器人的名字
auto robot_name = impl->getRobotNames().front();
auto robot_interface = impl->getRobotInterface(robot_name);
void exampleSpeedLine(RpcClientPtr impl)
{
// 接口调用: 获取机器人的名字
auto robot_name = impl->getRobotNames().front();
auto robot_interface = impl->getRobotInterface(robot_name);
// 接口调用: 设置机械臂的速度比率
robot_interface->getMotionControl()->setSpeedFraction(0.3);
// 接口调用: 设置机械臂的速度比率
robot_interface->getMotionControl()->setSpeedFraction(0.3);
// 接口调用: 设置工具中心点(TCP相对于法兰盘中心的偏移)
std::vector<double> tcp_offset(6, 0.0);
robot_interface->getRobotConfig()->setTcpOffset(tcp_offset);
// 接口调用: 设置工具中心点(TCP相对于法兰盘中心的偏移)
std::vector<double> tcp_offset(6, 0.0);
robot_interface->getRobotConfig()->setTcpOffset(tcp_offset);
// 输入字符串
std::string input_axis;
// 定义输入字符串和键值映射
std::map<std::string, int> keymap;
keymap["x+"] = 1;
keymap["x-"] = 2;
keymap["y+"] = 3;
keymap["y-"] = 4;
keymap["z+"] = 5;
keymap["z-"] = 6;
keymap["rx+"] = 7;
keymap["rx-"] = 8;
keymap["ry+"] = 9;
keymap["ry-"] = 10;
keymap["rz+"] = 11;
keymap["rz-"] = 12;
keymap["s"] = 13;
keymap["exit"] = 14;
// 输入字符串
std::string input_axis;
// 定义输入字符串和键值映射
std::map<std::string, int> keymap;
keymap["x+"] = 1;
keymap["x-"] = 2;
keymap["y+"] = 3;
keymap["y-"] = 4;
keymap["z+"] = 5;
keymap["z-"] = 6;
keymap["rx+"] = 7;
keymap["rx-"] = 8;
keymap["ry+"] = 9;
keymap["ry-"] = 10;
keymap["rz+"] = 11;
keymap["rz-"] = 12;
keymap["s"] = 13;
keymap["exit"] = 14;
// 初始化循环控制变量
bool continue_loop = true;
// 初始化循环控制变量
bool continue_loop = true;
// speedLine速度
double speed = 0.25;
// speedLine速度
double speed = 0.25;
int cnt = 0;
while (continue_loop) {
std::cout << "请输入机械臂要运动的轴: " << std::endl;
// 显示有效输入提示
if (cnt++ == 0) {
std::cout << "有效输入值如下: "
"x+、x-、y+、y-、z+、z-、rx+、rx-、ry+、ry-、rz+"
"、rz-、s、exit"
<< std::endl;
std::cout << "x+表示x轴正方向做直线运动,x-表示x轴负方向做直线运动,y+"
int cnt = 0;
while (continue_loop) {
std::cout << "请输入机械臂要运动的轴: " << std::endl;
// 显示有效输入提示
if (cnt++ == 0) {
std::cout << "有效输入值如下: "
"x+、x-、y+、y-、z+、z-、rx+、rx-、ry+、ry-、rz+"
"、rz-、s、exit"
<< std::endl;
std::cout
<< "x+表示x轴正方向做直线运动,x-表示x轴负方向做直线运动,y+"
"表示y轴正方向做直线运动,y-"
"表示y轴负方向做直线运动,z+表示z轴正方向做直线运动,z-"
"表示z轴负方向做直线运动,rx+"
@ -232,192 +235,195 @@ void exampleSpeedLine(RpcClientPtr impl) {
"表示y轴负方向做旋转运动,rz+表示z轴正方向做旋转运动,rz-"
"表示z轴负方向做旋转运动,s表示停止运动,exit表示退出循环"
<< std::endl;
}
}
std::cin >> input_axis;
char value = keymap[input_axis];
switch (value) {
case 1: {
std::vector<double> qd = {speed, 0.0, 0.0, 0.0, 0.0, 0.0};
std::cin >> input_axis;
char value = keymap[input_axis];
switch (value) {
case 1: {
std::vector<double> qd = { speed, 0.0, 0.0, 0.0, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系x轴正方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 2: {
std::vector<double> qd = {speed * (-1), 0.0, 0.0, 0.0, 0.0, 0.0};
// 接口调用: TCP沿着基坐标系x轴正方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 2: {
std::vector<double> qd = { speed * (-1), 0.0, 0.0, 0.0, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系x轴负方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 3: {
std::vector<double> qd = {0.0, speed, 0.0, 0.0, 0.0, 0.0};
// 接口调用: TCP沿着基坐标系x轴负方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 3: {
std::vector<double> qd = { 0.0, speed, 0.0, 0.0, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系y轴正方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 4: {
std::vector<double> qd = {0.0, speed * (-1), 0.0, 0.0, 0.0, 0.0};
// 接口调用: TCP沿着基坐标系y轴正方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 4: {
std::vector<double> qd = { 0.0, speed * (-1), 0.0, 0.0, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系y轴负方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 5: {
std::vector<double> qd = {0.0, 0.0, speed, 0.0, 0.0, 0.0};
// 接口调用: TCP沿着基坐标系y轴负方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 5: {
std::vector<double> qd = { 0.0, 0.0, speed, 0.0, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系z轴正方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
// 接口调用: TCP沿着基坐标系z轴正方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 6: {
std::vector<double> qd = {0.0, 0.0, speed * (-1), 0.0, 0.0, 0.0};
case 6: {
std::vector<double> qd = { 0.0, 0.0, speed * (-1), 0.0, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系z轴负方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 7: {
std::vector<double> qd = {0.0, 0.0, 0.0, speed, 0.0, 0.0};
// 接口调用: TCP沿着基坐标系z轴负方向做直线运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 7: {
std::vector<double> qd = { 0.0, 0.0, 0.0, speed, 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系x轴正方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 8: {
std::vector<double> qd = {0.0, 0.0, 0.0, speed * (-1), 0.0, 0.0};
// 接口调用: TCP沿着基坐标系x轴正方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 8: {
std::vector<double> qd = { 0.0, 0.0, 0.0, speed * (-1), 0.0, 0.0 };
// 接口调用: TCP沿着基坐标系x轴负方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 9: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, speed, 0.0};
// 接口调用: TCP沿着基坐标系x轴负方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 9: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, speed, 0.0 };
// 接口调用: TCP沿着基坐标系y轴正方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 10: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, speed * (-1), 0.0};
// 接口调用: TCP沿着基坐标系y轴正方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 10: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, speed * (-1), 0.0 };
// 接口调用: TCP沿着基坐标系y轴负方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 11: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, 0.0, speed};
// 接口调用: TCP沿着基坐标系y轴负方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 11: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, 0.0, speed };
// 接口调用: TCP沿着基坐标系z轴正方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 12: {
std::vector<double> qd = {0.0, 0.0, 0.0, 0.0, 0.0, speed * (-1)};
// 接口调用: TCP沿着基坐标系z轴正方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 12: {
std::vector<double> qd = { 0.0, 0.0, 0.0, 0.0, 0.0, speed * (-1) };
// 接口调用: TCP沿着基坐标系z轴负方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 13: {
// 接口调用: 停止直线速度跟随运动
robot_interface->getMotionControl()->stopLine(10, 10);
// 接口调用: TCP沿着基坐标系z轴负方向做旋转运动
robot_interface->getMotionControl()->speedLine(qd, 1.2, 100);
break;
}
case 13: {
// 接口调用: 停止直线速度跟随运动
robot_interface->getMotionControl()->stopLine(10, 10);
break;
break;
}
case 14: {
// 退出循环
continue_loop = false;
break;
}
default: {
std::cerr << "输入值无效" << std::endl;
std::cerr << "以下为有效输入值: "
"x+、x-、y+、y-、z+、z-、rx+、rx-、ry+、ry-、rz+"
"、rz-、s、exit"
<< std::endl;
}
}
}
case 14: {
// 退出循环
continue_loop = false;
break;
}
default: {
std::cerr << "输入值无效" << std::endl;
std::cerr << "以下为有效输入值: "
"x+、x-、y+、y-、z+、z-、rx+、rx-、ry+、ry-、rz+"
"、rz-、s、exit"
<< std::endl;
}
}
}
}
// 打印日志信息
void printlog(int level, const char *source, int code, std::string content) {
static const char *level_names[] = {"Critical", "Error", "Warning",
"Info", "Debug", "BackTrace"};
fprintf(stderr, "[%s] %s - %d %s\n", level_names[level], source, code,
content.c_str());
void printlog(int level, const char *source, int code, std::string content)
{
static const char *level_names[] = { "Critical", "Error", "Warning",
"Info", "Debug", "BackTrace" };
fprintf(stderr, "[%s] %s - %d %s\n", level_names[level], source, code,
content.c_str());
}
#define LOCAL_IP "127.0.0.1"
int main(int argc, char **argv) {
int main(int argc, char **argv)
{
#ifdef WIN32
// 将Windows控制台输出代码页设置为 UTF-8
SetConsoleOutputCP(CP_UTF8);
// 将Windows控制台输出代码页设置为 UTF-8
SetConsoleOutputCP(CP_UTF8);
#endif
auto rpc_cli = std::make_shared<RpcClient>();
// 接口调用: 设置 RPC 超时
rpc_cli->setRequestTimeout(1000);
// 接口调用: 连接到 RPC 服务
rpc_cli->connect(LOCAL_IP, 30004);
// 接口调用: 登录
rpc_cli->login("aubo", "123456");
auto rpc_cli = std::make_shared<RpcClient>();
// 接口调用: 设置 RPC 超时
rpc_cli->setRequestTimeout(1000);
// 接口调用: 连接到 RPC 服务
rpc_cli->connect(LOCAL_IP, 30004);
// 接口调用: 登录
rpc_cli->login("aubo", "123456");
auto rtde_cli = std::make_shared<RtdeClient>();
// 接口调用: 连接到 RTDE 服务
rtde_cli->connect(LOCAL_IP, 30010);
// 接口调用: 登录
rtde_cli->login("aubo", "123456");
auto rtde_cli = std::make_shared<RtdeClient>();
// 接口调用: 连接到 RTDE 服务
rtde_cli->connect(LOCAL_IP, 30010);
// 接口调用: 登录
rtde_cli->login("aubo", "123456");
// 接口调用: 设置 RTDE 话题
int topic = rtde_cli->setTopic(false, {"R1_message"}, 200, 0);
if (topic < 0) {
std::cout << "设置话题失败!" << std::endl;
return -1;
}
// 接口调用: 订阅话题
rtde_cli->subscribe(topic, [](InputParser &parser) {
arcs::common_interface::RobotMsgVector msgs;
msgs = parser.popRobotMsgVector();
for (size_t i = 0; i < msgs.size(); i++) {
auto &msg = msgs[i];
std::string error_content = arcs::error_stack::errorCode2Str(msg.code);
for (auto it : msg.args) {
auto pos = error_content.find("{}");
if (pos != std::string::npos) {
error_content.replace(pos, 2, it);
} else {
break;
}
}
// 打印日志信息
printlog(msg.level, msg.source.c_str(), msg.code, error_content);
// 接口调用: 设置 RTDE 话题
int topic = rtde_cli->setTopic(false, { "R1_message" }, 200, 0);
if (topic < 0) {
std::cout << "设置话题失败!" << std::endl;
return -1;
}
});
// 关节示教
exampleSpeedJoint(rpc_cli);
// 接口调用: 订阅话题
rtde_cli->subscribe(topic, [](InputParser &parser) {
arcs::common_interface::RobotMsgVector msgs;
msgs = parser.popRobotMsgVector();
for (size_t i = 0; i < msgs.size(); i++) {
auto &msg = msgs[i];
std::string error_content =
arcs::error_stack::errorCode2Str(msg.code);
for (auto it : msg.args) {
auto pos = error_content.find("{}");
if (pos != std::string::npos) {
error_content.replace(pos, 2, it);
} else {
break;
}
}
// 打印日志信息
printlog(msg.level, msg.source.c_str(), msg.code, error_content);
}
});
// 在基坐标系下的位置姿态示教
// exampleSpeedLine(rpc_cli);
// 关节示教
exampleSpeedJoint(rpc_cli);
// 接口调用: 取消话题
rtde_cli->removeTopic(false, topic);
// 接口调用: 退出登录
rtde_cli->logout();
// 接口调用: 断开连接
rtde_cli->disconnect();
// 在基坐标系下的位置姿态示教
// exampleSpeedLine(rpc_cli);
// 接口调用: 退出登录
rpc_cli->logout();
// 接口调用: 断开连接
rpc_cli->disconnect();
// 接口调用: 取消话题
rtde_cli->removeTopic(false, topic);
// 接口调用: 退出登录
rtde_cli->logout();
// 接口调用: 断开连接
rtde_cli->disconnect();
return 0;
// 接口调用: 退出登录
rpc_cli->logout();
// 接口调用: 断开连接
rpc_cli->disconnect();
return 0;
}

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
auto robot = Robot("127.0.0.1");
// 设置控制周期,可选1000和5000
// 设置控制周期
if (robot.setControlPeriod(5000) < 0) {
std::cout << "set Control Period failed" << std::endl;
return -1;

View File

@ -44,41 +44,14 @@ inline auto operator*(const std::array<T, N> &l, T x)
}
using namespace arcs::research_interface;
int main(int argc, char *argv[])
int examplePositionControl(Robot robot, bool &finish, bool loop)
{
std::signal(SIGINT, on_sigint);
#ifdef SIGTERM
// Linux
std::signal(SIGTERM, on_sigint);
#endif
#ifdef SIGBREAK
// MSVC
std::signal(SIGBREAK, on_sigint);
#endif
auto robot = Robot("127.0.0.1");
// servo是否循环下发离线轨迹
bool loop = true;
// 离线轨迹是否完成或者机器人状态是否出错
bool finish = false;
// 设置控制周期,可选1000和5000
if (robot.setControlPeriod(5000) < 0) {
std::cout << "set Control Period failed" << std::endl;
int ret = robot.setServoMode(
static_cast<int>(arcs::aubo_sdk::JointServoModeType::Position));
if (ret < 0) {
std::cout << "setServoMode failed. " << std::endl;
return -1;
}
// 如果机器人没有上电,对机器人进行上电操作
if (robot.startup() < 0) {
std::cout << "robot start up failed" << std::endl;
return -1;
}
// record6为5ms轨迹,record7为1ms轨迹
TrajectoryIo traj_io("../trajs/record6.offt");
auto trajs = traj_io.parse();
@ -137,11 +110,203 @@ int main(int argc, char *argv[])
return jnt_pos;
},
false, 0, false);
if (!loop) {
finish = true;
}
}
// 停止记录
robot.stopRecord();
return 0;
}
int exampleVelocityControl(Robot robot, bool &finish, bool loop)
{
int ret = robot.setServoMode(
static_cast<int>(arcs::aubo_sdk::JointServoModeType::Velocity));
if (ret < 0) {
std::cout << "setServoMode failed. " << std::endl;
return -1;
}
// record8为5ms轨迹,record9为40ms轨迹
TrajectoryIo traj_io("../trajs/record8.offt");
auto trajs = traj_io.parse();
if (trajs.empty()) {
std::cout << "traj failed" << std::endl;
return -1;
}
int index = 0;
// 移动到零点
std::cout << "正在移动到零点. " << std::endl;
JointPositions jnt_pos;
jnt_pos.q = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
if (robot.movej(jnt_pos) < 0) {
return -1;
}
// 开始记录(储存至 arcs_ws/log/.trace/ 下)
auto csv_file = "research_control2.csv";
robot.startRecord(csv_file);
while (!finish) {
robot.read([](const RobotState &robot_state) {
std::cout << "read ===> q: " << robot_state.q * (180. / M_PI)
<< std::endl;
return true;
});
// 执行离线轨迹
robot.veloControl(
[&](const RobotState &robot_state, double duration) {
JointSpeeds jnt_velo;
// Ctrl+C 请求退出 & 机械臂状态出现了问题时,让 control
// 自然收尾退出
if (g_stop || robot_state.error_code) {
jnt_velo.finished = true;
finish = true;
return jnt_velo;
}
for (int i = 0; i < 6; i++) {
jnt_velo.qd[i] = trajs[index][i];
}
index++;
if (index >= trajs.size() && loop) {
// 无限循环跑离线轨迹
index = 0;
} else if (index >= trajs.size() && !loop) {
// 只跑一次离线轨迹
jnt_velo.finished = true;
finish = true;
}
return jnt_velo;
},
false, 0, false);
if (!loop) {
finish = true;
}
}
// 停止记录
robot.stopRecord();
return 0;
}
int exampleCurrentControl(Robot robot, bool &finish, bool loop)
{
robot.setServoMode(
static_cast<int>(arcs::aubo_sdk::JointServoModeType::Current));
// record10为5ms轨迹
TrajectoryIo traj_io("../trajs/record10.offt");
auto trajs = traj_io.parse();
if (trajs.empty()) {
std::cout << "traj failed" << std::endl;
return -1;
}
int index = 0;
// 移动到零点
std::cout << "正在移动到零点. " << std::endl;
JointPositions jnt_pos;
jnt_pos.q = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
if (robot.movej(jnt_pos) < 0) {
return -1;
}
// 开始记录(储存至 arcs_ws/log/.trace/ 下)
auto csv_file = "research_control2.csv";
robot.startRecord(csv_file);
while (!finish) {
robot.read([](const RobotState &robot_state) {
std::cout << "read ===> q: " << robot_state.q * (180. / M_PI)
<< std::endl;
return true;
});
// 执行离线轨迹
robot.currentControl(
[&](const RobotState &robot_state, double duration) {
JointCurrents jnt_curr;
// Ctrl+C 请求退出 & 机械臂状态出现了问题时,让 control
// 自然收尾退出
if (g_stop || robot_state.error_code) {
jnt_curr.finished = true;
finish = true;
return jnt_curr;
}
for (int i = 0; i < 6; i++) {
jnt_curr.current[i] = trajs[index][i];
}
index++;
if (index >= trajs.size() && loop) {
// 无限循环跑离线轨迹
index = 0;
} else if (index >= trajs.size() && !loop) {
// 只跑一次离线轨迹
jnt_curr.finished = true;
finish = true;
}
return jnt_curr;
},
false, 0, false);
if (!loop) {
finish = true;
}
}
// 停止记录
robot.stopRecord();
return 0;
}
int main(int argc, char *argv[])
{
std::signal(SIGINT, on_sigint);
#ifdef SIGTERM
// Linux
std::signal(SIGTERM, on_sigint);
#endif
#ifdef SIGBREAK
// MSVC
std::signal(SIGBREAK, on_sigint);
#endif
auto robot = Robot("10.0.0.1");
// servo是否循环下发离线轨迹
bool loop = false;
// 离线轨迹是否完成或者机器人状态是否出错
bool finish = false;
// 位置环支持周期:1000/5000
// 速度环支持周期:1000/5000的倍数
int control_period = 5000;
if (robot.setControlPeriod(control_period) < 0) {
std::cout << "set Control Period failed" << std::endl;
return -1;
}
// 如果机器人没有上电,对机器人进行上电操作
if (robot.startup() < 0) {
std::cout << "robot start up failed" << std::endl;
return -1;
}
// 位置控制
// examplePositionControl(robot, finish, loop);
// 速度控制
exampleVelocityControl(robot, finish, loop);
// 电流控制
// exampleCurrentControl(robot, finish, loop);
return g_stop ? 130 : 0;
}

View File

@ -0,0 +1,199 @@
using System;
using System.Runtime.InteropServices;
using System.Threading;
namespace csharp_example
{
class ExampleMoveSpline
{
const int RSERR_SUCC = 0;
const string robot_ip = "192.168.15.139";
const int server_port = 30004;
const double M_PI = 3.14159265358979323846;
const int max_start_retry_count = 200;
static int waitMotionFinished(IntPtr motion_control, string motion_name)
{
int retry_count = 0;
while (cSharpBinging_MotionControl.getExecId(motion_control) == -1)
{
if (retry_count++ >= max_start_retry_count)
{
Console.Error.WriteLine("等待{0}开始超时", motion_name);
return -1;
}
Thread.Sleep(50);
}
Console.WriteLine("{0}开始", motion_name);
while (cSharpBinging_MotionControl.getExecId(motion_control) != -1)
{
Thread.Sleep(50);
}
Console.WriteLine("{0}结束", motion_name);
return RSERR_SUCC;
}
static int exampleMoveSpline(IntPtr cli)
{
double degree = M_PI / 180;
double[][] joint_angles =
{
new double[] { 0, -15 * degree, 100 * degree, 25 * degree, 90 * degree, 0 },
new double[] { 19.25 * degree, -6.08 * degree, 78.87 * degree, -5.05 * degree, 90 * degree, 19.25 * degree },
new double[] { 28.20 * degree, -12.87 * degree, 52.22 * degree, -24.91 * degree, 90 * degree, 28.20 * degree },
new double[] { 38.20 * degree, -15.58 * degree, 58.16 * degree, -16.25 * degree, 90 * degree, 38.20 * degree },
new double[] { 38.20 * degree, -15.73 * degree, 91.05 * degree, 16.79 * degree, 90 * degree, 38.20 * degree }
};
double[] velocities = { 60 * degree, 60 * degree, 60 * degree, 180 * degree, 60 * degree };
IntPtr[] robot_names = new IntPtr[10];
string robot_name;
try
{
for (int i = 0; i < robot_names.Length; ++i)
{
robot_names[i] = Marshal.AllocHGlobal(100);
}
int robot_count = cSharpBinding_RPC.rpc_getRobotNames(cli, robot_names);
if (robot_count <= 0)
{
Console.Error.WriteLine("获取机器人名称失败");
return -1;
}
robot_name = Marshal.PtrToStringAnsi(robot_names[0]);
}
finally
{
for (int i = 0; i < robot_names.Length; ++i)
{
if (robot_names[i] != IntPtr.Zero)
{
Marshal.FreeHGlobal(robot_names[i]);
}
}
}
if (string.IsNullOrEmpty(robot_name))
{
Console.Error.WriteLine("机器人名称为空");
return -1;
}
IntPtr robot_interface = cSharpBinding_RPC.rpc_getRobotInterface(cli, robot_name);
if (robot_interface == IntPtr.Zero)
{
Console.Error.WriteLine("获取机器人接口失败");
return -1;
}
IntPtr motion_control = cSharpBinging_RobotInterface.robot_getMotionControl(robot_interface);
if (motion_control == IntPtr.Zero)
{
Console.Error.WriteLine("获取运动控制接口失败");
return -1;
}
int ret = cSharpBinging_MotionControl.setSpeedFraction(motion_control, 0.8);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("设置速度比例失败,返回码: {0}", ret);
return ret;
}
double acceleration = 80 * degree;
ret = cSharpBinging_MotionControl.moveJoint(
motion_control, joint_angles[0], acceleration, 60 * degree, 0, 0);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("运动到第一个路点失败,返回码: {0}", ret);
return ret;
}
ret = waitMotionFinished(motion_control, "关节运动到第一个路点");
if (ret != RSERR_SUCC)
{
return ret;
}
for (int i = 1; i < joint_angles.Length; ++i)
{
ret = cSharpBinging_MotionControl.moveSpline(
motion_control, joint_angles[i], acceleration, velocities[i], 0);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("添加第 {0} 个路点失败,返回码: {1}", i + 1, ret);
return ret;
}
Console.WriteLine("已添加第 {0} 个路点", i + 1);
}
ret = cSharpBinging_MotionControl.moveSpline(
motion_control, null, acceleration, 60 * degree, 0.005);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("结束路点添加失败,返回码: {0}", ret);
return ret;
}
return waitMotionFinished(motion_control, "样条运动");
}
static void Main_MoveSpline(string[] args)
{
IntPtr rpc_client = cSharpBinding_RPC.rpc_create_client(0);
if (rpc_client == IntPtr.Zero)
{
Console.Error.WriteLine("创建 RPC 客户端失败");
return;
}
bool connected = false;
bool logged_in = false;
try
{
int ret = cSharpBinding_RPC.rpc_setRequestTimeout(rpc_client, 1000);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("设置 RPC 超时失败,返回码: {0}", ret);
return;
}
ret = cSharpBinding_RPC.rpc_connect(rpc_client, robot_ip, server_port);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("连接 RPC 服务失败,返回码: {0}", ret);
return;
}
connected = true;
ret = cSharpBinding_RPC.rpc_login(rpc_client, "aubo", "123456");
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("登录失败,返回码: {0}", ret);
return;
}
logged_in = true;
ret = exampleMoveSpline(rpc_client);
if (ret != RSERR_SUCC)
{
Console.Error.WriteLine("样条运动示例失败,返回码: {0}", ret);
}
}
finally
{
if (logged_in)
{
cSharpBinding_RPC.rpc_logout(rpc_client);
}
if (connected)
{
cSharpBinding_RPC.rpc_disconnect(rpc_client);
}
cSharpBinding_RPC.rpc_destroy_client(rpc_client);
}
}
}
}

View File

@ -84,6 +84,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ExampleMoveJ.cs" />
<Compile Include="ExampleMoveSpline.cs" />
<Compile Include="csharp_binding.cs" />
<Compile Include="DemoPE.cs" />
<Compile Include="ExampleStartup.cs" />
@ -118,4 +119,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,360 @@
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000
-0.019588,0.017065,0.018595,-0.030861,0.011543,-0.012694
-0.117746,0.102576,0.111772,-0.185506,0.069383,-0.076303
-0.298562,0.260097,0.283414,-0.470377,0.175930,-0.193478
-0.548906,0.478188,0.521056,-0.864789,0.323447,-0.355710
-0.804458,0.700816,0.763642,-1.267410,0.474033,-0.521317
-1.000300,0.871426,0.949546,-1.575950,0.589433,-0.648228
-1.113480,0.970025,1.056990,-1.754260,0.656126,-0.721573
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.144760,0.997278,1.086680,-1.803550,0.674560,-0.741846
-1.142140,0.994997,1.084200,-1.799420,0.673017,-0.740149
-1.080230,0.941055,1.025420,-1.701870,0.636531,-0.700023
-0.935648,0.815104,0.888176,-1.474090,0.551337,-0.606332
-0.709101,0.617745,0.673123,-1.117170,0.417843,-0.459522
-0.450792,0.392715,0.427921,-0.710213,0.265633,-0.292129
-0.220147,0.191784,0.208977,-0.346836,0.129723,-0.142663
-0.070727,0.061615,0.067139,-0.111429,0.041676,-0.045834
-0.003966,0.003455,0.003765,-0.006248,0.002337,-0.002570
-0.017236,0.019588,0.024144,0.017298,0.017738,-0.028090
-0.103605,0.117746,0.145128,0.103979,0.106621,-0.168849
-0.262707,0.298562,0.367993,0.263654,0.270355,-0.428142
-0.482987,0.548906,0.676556,0.484727,0.497047,-0.787139
-0.707849,0.804458,0.991537,0.710399,0.728455,-1.153600
-0.880170,1.000300,1.232920,0.883342,0.905793,-1.434440
-0.979759,1.113480,1.372420,0.983290,1.008280,-1.596750
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-0.996328,1.132310,1.395630,0.999918,1.025330,-1.623750
-0.920125,1.045710,1.288890,0.923441,0.946911,-1.499560
-0.771190,0.876445,1.080260,0.773969,0.793641,-1.256830
-0.556069,0.631963,0.778927,0.558073,0.572257,-0.906244
-0.329317,0.374264,0.461300,0.330504,0.338904,-0.536699
-0.146830,0.166869,0.205675,0.147359,0.151104,-0.239293
-0.037074,0.042134,0.051932,0.037207,0.038153,-0.060421
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000
0.036379,-0.035628,-0.041132,0.019277,-0.027870,0.038097
0.155200,-0.152000,-0.175482,0.082243,-0.118899,0.162531
0.356681,-0.349325,-0.403292,0.189011,-0.273254,0.373529
0.613483,-0.600831,-0.693653,0.325094,-0.469991,0.642461
0.861167,-0.843407,-0.973704,0.456346,-0.659742,0.901845
1.036340,-1.014970,-1.171770,0.549174,-0.793944,1.085290
1.128860,-1.105580,-1.276380,0.598200,-0.864821,1.182180
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.143410,-1.119830,-1.292830,0.605909,-0.875966,1.197420
1.087410,-1.064980,-1.229510,0.576233,-0.833064,1.138770
0.948748,-0.929181,-1.072730,0.502756,-0.726837,0.993562
0.727597,-0.712592,-0.822679,0.385565,-0.557414,0.761965
0.469289,-0.459610,-0.530615,0.248683,-0.359523,0.491456
0.234017,-0.229191,-0.264598,0.124009,-0.179281,0.245071
0.078679,-0.077056,-0.088960,0.041693,-0.060276,0.082395
0.005999,-0.005875,-0.006783,0.003179,-0.004596,0.006282
0.013131,-0.013021,-0.015829,0.017076,-0.008864,0.007580
0.100956,-0.100115,-0.121699,0.131288,-0.068153,0.058278
0.271439,-0.269179,-0.327212,0.352993,-0.183244,0.156692
0.516617,-0.512316,-0.622766,0.671835,-0.348759,0.298224
0.774166,-0.767720,-0.933233,1.006760,-0.522626,0.446897
0.980339,-0.972176,-1.181770,1.274880,-0.661809,0.565913
1.103850,-1.094660,-1.330660,1.435500,-0.745191,0.637213
1.144740,-1.135210,-1.379950,1.488680,-0.772796,0.660817
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.114230,-1.104950,-1.343170,1.449000,-0.752197,0.643203
1.001920,-0.993574,-1.207780,1.302940,-0.676376,0.578369
0.806945,-0.800226,-0.972746,1.049390,-0.544754,0.465819
0.551619,-0.547026,-0.664960,0.717353,-0.372389,0.318429
0.300900,-0.298395,-0.362725,0.391305,-0.203132,0.173698
0.119215,-0.118223,-0.143711,0.155034,-0.080480,0.068819
0.020190,-0.020022,-0.024338,0.026256,-0.013630,0.011655
0.001507,-0.001365,-0.001756,-0.002478,-0.001474,0.002790
0.058335,-0.052859,-0.067985,-0.095917,-0.057056,0.108006
0.197821,-0.179251,-0.230546,-0.325267,-0.193485,0.366264
0.419752,-0.380347,-0.489190,-0.690175,-0.410550,0.777166
0.678060,-0.614407,-0.790230,-1.114900,-0.663196,1.255420
0.912710,-0.827029,-1.063700,-1.500720,-0.892703,1.689870
1.067220,-0.967035,-1.243770,-1.754780,-1.043830,1.975950
1.139070,-1.032140,-1.327510,-1.872920,-1.114100,2.108980
1.144760,-1.037300,-1.334140,-1.882270,-1.119670,2.119520
1.144760,-1.037290,-1.334130,-1.882270,-1.119660,2.119510
1.105700,-1.001900,-1.288610,-1.818040,-1.081460,2.047190
0.984061,-0.891682,-1.146850,-1.618040,-0.962489,1.821980
0.779766,-0.706565,-0.908760,-1.282130,-0.762672,1.443730
0.522484,-0.473436,-0.608917,-0.859093,-0.511031,0.967374
0.276271,-0.250336,-0.321974,-0.454258,-0.270215,0.511514
0.103910,-0.094156,-0.121100,-0.170854,-0.101632,0.192389
0.014208,-0.012874,-0.016558,-0.023362,-0.013897,0.026306
-0.004090,0.003959,0.004875,-0.001960,0.003100,-0.003820
-0.071250,0.068975,0.084935,-0.034146,0.054003,-0.066547
-0.221069,0.214010,0.263530,-0.105945,0.167555,-0.206477
-0.452040,0.437605,0.538863,-0.216635,0.342615,-0.422203
-0.710349,0.687665,0.846784,-0.340426,0.538395,-0.663461
-0.936545,0.906637,1.116420,-0.448828,0.709836,-0.874727
-1.080720,1.046210,1.288300,-0.517924,0.819113,-1.009390
-1.142240,1.105770,1.361630,-0.547406,0.865741,-1.066850
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.138330,1.101980,1.356970,-0.545532,0.862777,-1.063190
-1.064530,1.030540,1.269000,-0.510165,0.806843,-0.994267
-0.908076,0.879078,1.082490,-0.435185,0.688259,-0.848137
-0.671979,0.650520,0.801044,-0.322038,0.509313,-0.627624
-0.413671,0.400461,0.493124,-0.198247,0.313534,-0.386366
-0.193587,0.187405,0.230769,-0.092774,0.146726,-0.180809
-0.056046,0.054257,0.066811,-0.026860,0.042479,-0.052347
-0.001165,0.001128,0.001389,-0.000558,0.000883,-0.001088
-0.027338,0.023815,0.025951,-0.043071,0.016107,-0.017715
-0.135827,0.118323,0.128939,-0.213998,0.080030,-0.088019
-0.326976,0.284838,0.310394,-0.515155,0.192655,-0.211888
-0.581195,0.506296,0.551720,-0.915681,0.342441,-0.376627
-0.833458,0.726050,0.791191,-1.313130,0.491076,-0.540100
-1.018970,0.887651,0.967291,-1.605400,0.600377,-0.660313
-1.121820,0.977246,1.064920,-1.767440,0.660976,-0.726961
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.144760,0.997236,1.086710,-1.803590,0.674497,-0.741832
-1.138920,0.992151,1.081170,-1.794390,0.671057,-0.738049
-1.066670,0.929210,1.012580,-1.680560,0.628486,-0.691228
-0.911762,0.794263,0.865524,-1.436490,0.537213,-0.590842
-0.676811,0.589590,0.642488,-1.066330,0.398779,-0.438589
-0.418503,0.364570,0.397279,-0.659357,0.246583,-0.271199
-0.196948,0.171567,0.186960,-0.310295,0.116042,-0.127627
-0.057861,0.050404,0.054927,-0.091161,0.034092,-0.037495
-0.001433,0.001248,0.001360,-0.002257,0.000844,-0.000929
-0.024055,0.027338,0.033695,0.024141,0.024755,-0.039203
-0.119516,0.135827,0.167414,0.119946,0.122995,-0.194778
-0.287709,0.326976,0.403015,0.288745,0.296084,-0.468888
-0.511398,0.581195,0.716353,0.513240,0.526285,-0.833441
-0.733366,0.833458,1.027280,0.736009,0.754716,-1.195190
-0.896596,1.018970,1.255930,0.899827,0.922697,-1.461210
-0.987094,1.121820,1.382700,0.990651,1.015830,-1.608700
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-1.007290,1.144760,1.410980,1.010920,1.036610,-1.641610
-0.990781,1.126000,1.387860,0.994351,1.019620,-1.614710
-0.905486,1.029070,1.268380,0.908749,0.931846,-1.475700
-0.747460,0.849475,1.047020,0.750153,0.769219,-1.218160
-0.527658,0.599674,0.739130,0.529559,0.543019,-0.859941
-0.302529,0.343819,0.423775,0.303619,0.311336,-0.493041
-0.129133,0.146757,0.180886,0.129598,0.132892,-0.210452
-0.028468,0.032354,0.039878,0.028571,0.029297,-0.046396
0.000215,-0.000211,-0.000244,0.000114,-0.000165,0.000226
0.046711,-0.045748,-0.052815,0.024753,-0.035785,0.048917
0.175865,-0.172238,-0.198847,0.093194,-0.134731,0.184172
0.387678,-0.379683,-0.438340,0.205437,-0.297001,0.405990
0.645772,-0.632454,-0.730161,0.342204,-0.494727,0.676275
0.887585,-0.869280,-1.003570,0.470345,-0.679980,0.929510
1.052430,-1.030720,-1.189960,0.557698,-0.806267,1.102140
1.134610,-1.111210,-1.282880,0.601248,-0.869228,1.188210
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.144760,-1.121150,-1.294360,0.606627,-0.877005,1.198840
1.140930,-1.117400,-1.290020,0.604595,-0.874066,1.194820
1.074590,-1.052430,-1.215020,0.569444,-0.823249,1.125350
0.925603,-0.906514,-1.046560,0.490491,-0.709106,0.969324
0.695309,-0.680969,-0.786171,0.368455,-0.532677,0.728152
0.437000,-0.427988,-0.494107,0.231573,-0.334787,0.457642
0.210080,-0.205747,-0.237533,0.111324,-0.160942,0.220003
0.065073,-0.063731,-0.073577,0.034483,-0.049853,0.068147
0.002726,-0.002670,-0.003082,0.001445,-0.002088,0.002855
0.019588,-0.019425,-0.023613,0.025474,-0.013224,0.011308
0.117746,-0.116765,-0.141939,0.153122,-0.079488,0.067970
0.298562,-0.296076,-0.359907,0.388264,-0.201554,0.172349
0.548906,-0.544336,-0.661689,0.713824,-0.370557,0.316863
0.804458,-0.797760,-0.969749,1.046160,-0.543075,0.464383
1.000300,-0.991969,-1.205830,1.300840,-0.675284,0.577435
1.113480,-1.104210,-1.342260,1.448020,-0.751691,0.642770
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144760,-1.135230,-1.379980,1.488700,-0.772809,0.660829
1.144750,-1.135220,-1.379960,1.488690,-0.772802,0.660822
1.104710,-1.095510,-1.331690,1.436620,-0.745771,0.637708
0.982066,-0.973889,-1.183850,1.277130,-0.662975,0.566910
0.776761,-0.770294,-0.936361,1.010140,-0.524378,0.448395
0.519331,-0.515007,-0.626037,0.675363,-0.350591,0.299790
0.273669,-0.271390,-0.329899,0.355892,-0.184749,0.157979
0.102317,-0.101465,-0.123340,0.133058,-0.069072,0.059064
0.013624,-0.013510,-0.016423,0.017717,-0.009197,0.007864
0.004090,-0.003706,-0.004766,-0.006725,-0.004000,0.007572
0.071250,-0.064561,-0.083037,-0.117153,-0.069688,0.131919
0.221069,-0.200316,-0.257640,-0.363492,-0.216223,0.409307
0.452040,-0.409605,-0.526820,-0.743266,-0.442131,0.836948
0.710349,-0.643664,-0.827860,-1.167990,-0.694777,1.315200
0.936545,-0.848626,-1.091470,-1.539910,-0.916014,1.734000
1.080720,-0.979269,-1.259500,-1.776980,-1.057030,2.000950
1.142240,-1.035010,-1.331200,-1.878130,-1.117200,2.114850
1.144760,-1.037300,-1.334140,-1.882270,-1.119670,2.119520
1.144320,-1.036900,-1.333630,-1.881550,-1.119240,2.118700
1.095010,-0.992218,-1.276160,-1.800470,-1.071010,2.027410
0.963045,-0.872638,-1.122360,-1.583480,-0.941934,1.783070
0.748421,-0.678163,-0.872231,-1.230590,-0.732015,1.385690
0.490196,-0.444178,-0.571287,-0.806003,-0.479450,0.907592
0.250206,-0.226718,-0.291597,-0.411400,-0.244721,0.463254
0.088177,-0.079899,-0.102764,-0.144985,-0.086244,0.163259
0.008807,-0.007980,-0.010264,-0.014481,-0.008614,0.016306
-0.007965,0.007710,0.009494,-0.003817,0.006037,-0.007439
-0.085457,0.082728,0.101871,-0.040954,0.064771,-0.079816
-0.245609,0.237765,0.292782,-0.117705,0.186154,-0.229397
-0.484329,0.468862,0.577353,-0.232109,0.367088,-0.452360
-0.742603,0.718888,0.885233,-0.355883,0.562841,-0.693586
-0.959087,0.928460,1.143300,-0.459631,0.726922,-0.895781
-1.092930,1.058030,1.302850,-0.523775,0.828368,-1.020790
-1.144120,1.107580,1.363870,-0.548306,0.867164,-1.068600
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.144760,1.108210,1.364630,-0.548614,0.867651,-1.069200
-1.133630,1.097430,1.351360,-0.543277,0.859211,-1.058800
-1.049500,1.015980,1.251070,-0.502959,0.795446,-0.980223
-0.882707,0.854519,1.052250,-0.423027,0.669031,-0.824443
-0.639690,0.619262,0.762554,-0.306564,0.484841,-0.597466
-0.381741,0.369551,0.455061,-0.182945,0.289333,-0.356544
-0.171874,0.166385,0.204886,-0.082369,0.130269,-0.160529
-0.044666,0.043240,0.053245,-0.021406,0.033854,-0.041718
-0.000115,0.000111,0.000137,-0.000055,0.000087,-0.000107
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000

View File

@ -0,0 +1,30 @@
# AUBO SDK BSD 2-Clause License Notice
AUBO (BEIJING) ROBOTICS TECHNOLOGY CO., LTD. ("AUBO") licenses the following AUBO SDK components under the **BSD 2-Clause License** (identifier: `BSD-2-Clause`).
## Applicable Components
This notice applies only to components in the release package explicitly marked as `BSD-2-Clause`:
1. The AUBO SDK client shared libraries and accompanying binaries;
2. The public API header files shipped with those binaries;
3. Other files the release package, component list, or file license markers explicitly designate as `BSD-2-Clause`.
Source code not shipped with the release package, and controller software, server software, firmware, algorithm implementations, internal tools, and any files not explicitly marked, are not covered. Third-party software remains governed by its own licenses.
## License Text
Copyright (c) 2026 AUBO (BEIJING) ROBOTICS TECHNOLOGY CO., LTD.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## Additional Notes
- This license does not grant rights to use the "AUBO", "遨博", or any AUBO trademarks, trade names, or logos, except for fair use to accurately state the software's origin or compatibility.
- This license covers copyright only and is not a certification of safety, fitness, or compliance.

View File

@ -0,0 +1,30 @@
# AUBO SDK BSD 2-Clause 许可声明
遨博(北京)智能科技股份有限公司(以下简称“AUBO”)将下列 AUBO SDK 组件按 **BSD 2-Clause License** 提供许可(标识符:`BSD-2-Clause`)。
## 适用组件
本声明仅适用于发布包中明确标注适用 `BSD-2-Clause` 的组件:
1. AUBO SDK 客户端动态链接库及配套二进制文件;
2. 配套的公有 API 头文件;
3. 发布包、组件清单或文件许可标识中明确指定适用 `BSD-2-Clause` 的其他文件。
未随发布包交付的源代码,以及控制器软件、服务端软件、固件、算法实现、内部工具和未明确标注的文件,不属于本软件。第三方软件继续适用其各自许可证。
## 许可文本
Copyright (c) 2026 AUBO (BEIJING) ROBOTICS TECHNOLOGY CO., LTD.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## 其他
- 本许可不授予“AUBO”“遨博”及 AUBO 商标、商号、徽标的使用权,为如实说明来源或兼容性而进行的合理使用除外。
- 本许可仅涉及著作权,不构成对安全性、适用性或合规性的认证。

View File

@ -4,5 +4,9 @@ Primary license texts:
- English: licenses/AUBO_SDK_LICENSE.en.md
- Simplified Chinese: licenses/AUBO_SDK_LICENSE.zh-CN.md
Dual-license choice (choose one of the two for covered components):
- Notice: licenses/README.md
- BSD 2-Clause notice: licenses/AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE.en.md / .zh-CN.md
Third-party dependency license notices:
- licenses/third_party/

View File

@ -0,0 +1,31 @@
# AUBO SDK 许可说明 / AUBO SDK License Notes
本目录包含 AUBO SDK 的全部许可文件。就下列组件,AUBO(遨博(北京)智能科技股份有限公司)提供**二选一**许可:你可在《AUBO SDK 使用许可协议》与 `BSD 2-Clause License` 之间,任选其一适用。
## 双许可选择 / Dual-License Choice
**适用组件**:发布包中明确标注适用 `BSD-2-Clause` 的组件,包括 AUBO SDK 客户端动态链接库及配套二进制文件、配套的公有 API 头文件,以及发布包、组件清单或文件许可标识中明确指定适用 `BSD-2-Clause` 的其他文件。该范围与 `AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE` 列明的一致。
**如何选择**:
- 选择 BSD 2-Clause:上述组件按 `BSD-2-Clause` 提供,只需遵守 `AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE`;SDK 许可协议对该等组件的再分发等限制不适用。
- 选择 SDK 许可协议:上述组件按 `AUBO_SDK_LICENSE` 提供。
两种选择互斥,择一即可,**无需同时接受两份协议**。未被上述范围覆盖的 SDK 组件(控制器软件、服务端软件、固件、算法实现、内部工具及未明确标注的文件)仅适用 `AUBO_SDK_LICENSE`,不提供 BSD 选项。第三方软件继续适用其各自许可证(见 `third_party/`)。
---
This directory contains all AUBO SDK license files. For the components below, AUBO offers a choose-one-of-two license: you may apply either the AUBO SDK License Agreement or the BSD 2-Clause License, at your option.
**Covered components**: those explicitly marked `BSD-2-Clause` in the release package — the AUBO SDK client shared library and accompanying binaries, the accompanying public API headers, and any other files explicitly designated `BSD-2-Clause` in the package, component manifest, or file markings (same scope as `AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE`).
**How to choose**:
- Choose BSD 2-Clause: covered components are provided under BSD-2-Clause; comply only with `AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE`, and the SDK License's redistribution restrictions do not bind you for those components.
- Choose the SDK License: covered components are provided under `AUBO_SDK_LICENSE`.
The two choices are mutually exclusive: pick one to apply, and **no need to accept both agreements**. Components outside that scope (controller/server software, firmware, algorithm implementations, internal tools, unmarked files) are provided solely under `AUBO_SDK_LICENSE` and are not offered under BSD. Third-party software keeps its own licenses (see `third_party/`).
## 文件清单 / Files
- `AUBO_SDK_LICENSE.zh-CN.md` / `AUBO_SDK_LICENSE.en.md` — AUBO SDK 使用许可协议(EULA)
- `AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE.zh-CN.md` / `AUBO_SDK_BSD_2_CLAUSE_LICENSE_NOTICE.en.md` — BSD 2-Clause 许可声明
- `third_party/` — 第三方软件许可证

View File

@ -251,13 +251,15 @@ message ServoJ {
}
}
// 开始记录示教轨迹。轨迹文件由机械臂控制器管理。
// 开始记录实际关节轨迹,CSV 保存在服务端程序目录 data/trajectories/<device_id>。
message StartTrajectoryRecording {
message Request {
// 通用请求头,包含目标设备 ID 和请求时间戳。
CommandHeader.Request header = 1;
// 轨迹文件名;不能为空。文件位置和格式由机械臂厂商 SDK 决定。
// 不含目录的文件名;不覆盖已有文件,自动补充 .csv。
string file_name = 2;
// 实际关节采样频率 Hz;0 使用 100,支持 1~100。
double sampling_frequency_hz = 3;
}
message Response {
@ -266,6 +268,40 @@ message StartTrajectoryRecording {
}
}
// 已完成且通过校验的 CSV;不包含录制中的 .partial 文件。
message RecordedTrajectory {
string file_name = 1;
uint64 samples = 2;
double duration_s = 3;
double sampling_frequency_hz = 4;
}
message ListRecordedTrajectories {
message Request { CommandHeader.Request header = 1; }
message Response {
CommandHeader.Feedback header = 1;
repeated RecordedTrajectory trajectories = 2;
string directory = 3;
bool recording = 4;
string recording_file = 5;
uint64 recorded_samples = 6;
string recording_error = 7;
}
}
message ReplayRecordedTrajectory {
message Request {
CommandHeader.Request header = 1;
string file_name = 2;
// 0 使用原速;支持 0.1~1,只允许降速。
double speed_ratio = 3;
// 平滑限值;0 使用默认值 0.3 rad/s、0.5 rad/s²、2 rad/s³。
// 回放经 BSplineSmoother 重新定时,可能偏离原始中间点;首尾保持不变。
double max_velocity = 4;
double max_acceleration = 5;
double max_jerk = 6;
}
message Response { CommandHeader.Feedback header = 1; }
}
// 机械臂关节状态。
message JointState {
// 关节名称列表,无单位;与 position、velocity、effort 按索引对应。

View File

@ -47,7 +47,7 @@ service ArmService {
rpc ExecuteJsonCommand(JsonDeviceCommand.Request) returns (JsonDeviceCommand.Feedback);
// 进入拖动示教模式;仅支持具备该能力的机械臂。
rpc EnterTeachingMode(CommandHeader.Request) returns (CommandHeader.Feedback);
// 开始记录示教轨迹;轨迹文件由机械臂控制器管理。
// 开始记录实际关节轨迹到服务端 CSV。
rpc StartTrajectoryRecording(StartTrajectoryRecording.Request) returns (StartTrajectoryRecording.Response);
// 完成示教:停止轨迹记录并退出拖动示教模式。
rpc CompleteTeaching(CommandHeader.Request) returns (CommandHeader.Feedback);
@ -55,4 +55,10 @@ service ArmService {
rpc StopTrajectoryRecording(CommandHeader.Request) returns (CommandHeader.Feedback);
// 单独退出拖动示教模式,不停止轨迹记录。
rpc ExitTeachingMode(CommandHeader.Request) returns (CommandHeader.Feedback);
// 查询 CSV 轨迹及当前录制状态,不启动采样或运动。
rpc ListRecordedTrajectories(ListRecordedTrajectories.Request) returns (ListRecordedTrajectories.Response);
// 低速到所选轨迹起点(0.1 rad/s,0.1 rad/s²);必须退出示教且已使能。
rpc MoveToTrajectoryStart(ReplayRecordedTrajectory.Request) returns (ReplayRecordedTrajectory.Response);
// 同步回放;必须先到达起点,结束后返回。取消请求会停止运动。
rpc ReplayRecordedTrajectory(ReplayRecordedTrajectory.Request) returns (ReplayRecordedTrajectory.Response);
}