xarm-developer / xarm-cplus-sdk Goto Github PK
View Code? Open in Web Editor NEWC++ SDK for UFACTORY robots, 850, xArm5/6/7, and Lite6.
Home Page: https://www.ufactory.cc/
License: BSD 3-Clause "New" or "Revised" License
C++ SDK for UFACTORY robots, 850, xArm5/6/7, and Lite6.
Home Page: https://www.ufactory.cc/
License: BSD 3-Clause "New" or "Revised" License
I see in uxbus_cmd.cc that at some point there was a function to set individual joint torques for the robot, and the function has been commented out. Is this functionality still possible with the underlying controller? is this going to be fixed in the API at some point?
// // this interface is no longer supported
// int UxbusCmd::set_servot(float jnt_taus[7]) {
Also is there any documentation about achievable update rates for setting torque?
I see from this issue that the maximum supported polling rate for reading position is 250hz.
Greetings,
I have seen that even after any collision the Zero Position button , works fine , is there a way I can achieve the same result using C++ or ROS API? Any help would be much appreciated.
So i am having difficulties with the record trajectory, I have modified the code to c# and know the state and mode portion is working since i can move the robot and operate regular. But i want to allow for a person to move robot and teach positions. So from what i read in the limited documentation is that state =0 and mode =2 but when i set to that the robot is stiff and fights back when trying to move.
In the manual it shows not available but in the src/wrapper/api.cc file you show it in use as mode 2 so what is going on there?
When performing joint based motion, we have the option to specify speed in the function set_servo_angle_j
:
int set_servo_angle_j(float angles[7], float speed=0, float acc=0, float mvtime=0)
However checking the source code it would appear that speed
is never used, and instead last_used_joint_speed
is used, which is only set through set_servo_angle
Is there a way to set joint speed (and preferably a different value for each joint) through the API?
There is no smooth motion if the following motion commands are called consecutively, meaning the xArm6 robot has to stop in between both motions:
Basically every command except set_position() with a radius superior to 0 (and wait=false).
Is there a way to achieve different kinds of motion smoothly ?
Hi,
The Control Box External 485 Device Communication Error keeps occurring. RS485 is not been used in the system. What are the possible causes? and can it be cleared using the c++ api, like it can be using Ufactory studio?
Regards,
Adam
I'm hoping these fixes can help someone.
I was able to get the C++ SDK compiling on MacOS Mojave with a couple simple fixes to two files.
in src/xarm/core/os/network.cc: I added the following at line 42:
#if !defined(SOL_TCP) && defined(IPPROTO_TCP)
#define SOL_TCP IPPROTO_TCP
#endif
#if !defined(TCP_KEEPIDLE) && defined(TCP_KEEPALIVE)
#define TCP_KEEPIDLE TCP_KEEPALIVE
#endif
in the top Makefile, I changed
C_FLAGS = -std=c++0x -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-variable -g -s $(C_DEFS) -I$(INC_DIR) $(LIBDIRS)
LIBS += -lm -lpthread -fPIC -shared
to
C_FLAGS = -std=c++0x -Wall -Wno-sign-compare -Wno-unused-variable -g $(C_DEFS) -I$(INC_DIR) $(LIBDIRS)
LIBS += -lm -lpthread -fPIC -shared -framework IOKit -framework CoreFoundation
This was enough for the full compile to complete. There are still a couple of warnings popping up, but they look minor.
I have managed to build the SDK successfully after defining the Windows macros in include/xarm/wrapper/xarm_wrapper.h:
#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#define __declspec(dllexport)
#define __stdcall
#endif
Successful build tested in Docker as well (Ubunutu 16.04 with ROS kinetic image).
I have not tested the SDK functionality and can't guarantee this fix has not affected it.
Hi, I would like to know if there is any example that can be used to stop the arm like it happens with emergency stop button?
Hi I'm looking for the torque-controllable robotic arm and, as i look around the repositories, xArm series seem to support the torque control(using "set_servot" function). So, I wonder how much the maximum frequency of the control loop is when using the SDK. As far as i search, Lite 6 support upto 200Hz, but the case of xArm cannot be found.
Thanks
Hi,
I'm coming over here from your ROS pacakges. While there, I was told that you can only reliably get joint angles at a max rate of 5Hz. I was wondering how fast I can reliable call the get_servo_angle function?
get_inverse_kinematics(f32* pose, f32* angles)
returns the current robot angles (with slight offset) instead of the angles needed to reach the input Cartesian pose.
I'm trying to perform a NON linear motion (point to point) with Cartesian coordinates, hence I would like to use set_servo_angle(angles, speed, acc, mvtime, wait, timeout) with the angles calculated from inverse kinematics.
Or is there another way to achieve this ?
Hi, I would like to know do we have any example of motion planning using xarm SDK?
Hi,
I am testing the new functionalities added with the 1.8.0 version, but I can not make work the example of impedance control.
After I enable the sensore, I receive the error code: 50 (Force sensor read error).
There is something missing in this example?
Thanks for your attention. I am looking forward to your reply.
Inside set_tcp_load() makes a call to compare_version() with a new:
if (compare_version(version_number, new int[3]{ 0, 2, 0 })) {
https://github.com/xArm-Developer/xArm-CPLUS-SDK/blob/master/src/xarm/wrapper/xarm_params.cc#L59
In my understanding, the pointer returned by new is lost when the function returns, however the memory remains allocated until delete can be called on that pointer (new is not affected by scope) - this would be a memory leak.
as i see, there is only makefile in this repo, is any one has a CMakeLists.txt file?
Hello, we recnetly need information of velocity, acceleration and torque of each joint for some calculations. While the first and third one can be achieved that with C++ API arm->realtime_joint_speeds and arm->joints_torque properties, how to deal with accelerations? Is that avaliable? What is more, why joint_jerk property only return a single number? There should be 6 joints for my xarm 6 and which joint this number stands for?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.