Giter VIP home page Giter VIP logo

dorna's People

Contributors

smhty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dorna's Issues

prise en main séquence pick and place avec le bras robot Dorna simple

Bonjour, c’est ma toute première fois d’utiliser le bras de robot dorna (Dorna simple et 6 axes). j’ai déjà fait tous les préléminaires de connexion. mais j’aimerais s’il vous plais un programme de pick and place pour tester les mouvements et la pince liée au servomoteur. Merci d'avance

can you update the home command to append

In

1052 def home(self, joint):
1053		if joint not in ["j0","j1", "j2", "j3", "j4"]:
1054 			return None 
1055											
1056		# homing
1057		# job_1: home
1058		command = {"command": "home", "prm": [joint]}		
1059                result = self.play(command, False)

Can you remove the append = False, or at least make it optional.

I am operating the Dorna in a confined space and It would be good if I could reposition the robot before homing certain joints.

Robot playback motion

Hello @smhty,
It is often cumbersome to specify exact coordinates and path the robot end effector has to take. Usually, there is a playback option for robotic arms that allows the user to cut off the power to motors to record the motion and play it back. I am wondering if there is some way of achieving this on Dorna. Is there an option to power off the motors while still allowing the user to record the position of the arm?

Thanks,
Gowtham.

Command and Inputs

My name is Raul Garcia I bought a Dorna robot arm.
The application we are developing is the placement of a stamp. The point where the ink is loaded is fixed, but the sealing point may vary in distance. For that reason, a seal was designed that has a sensor and when it comes into contact with the sealing point it sends a signal to port P1 of dorna.
The problem is that the "wait input" command is not working (maybe we are applying it wrong). Could you pass me a script with an example of using that command?
We have also seen that when sending the commands to the robot there is a difference in the time between the execution of the movements and the progress of the script. For that reason if we consult robit.io () it does not have the signal. In that scheme should I use time.sleep ()?

Drawing circles with the arm

Hello @smhty ,
I bought the Dorna arm recently. I am trying to draw a circle using the robotic arm. Currently, there is no direct command to draw a circle. I can generate a circular arc by breaking it into several line segments. But that process will be slow and unwieldy since the robot slows down to stop at each waypoint.

Is there any way of forwarding a circle command to the robot. If not, I would like to add that to the API. I understand that the python code forwards commands to Arduino due which is running a modified version of g2core. I do not have access to the version of g2core that is being used or how to update that.

Can you provide the steps on how to modify the Arduino due firmware or how to send a circular arc command to the robotic arm?

Thanks,
Gowtham.

_xyz_to_joint error

Two things

  1. I believe this function should not but "private" since it is super helpful for users so consider renaming it

  2. when I run this function I get a type error "bool" is not iterable
    Solution:
    Comment out the initial check,
    if any(xyz == None):

Diy

can i build this project ? i have arduino how i can build it ?

thanks

Arm Freezes

I am running into an issue when using the dorna API on Windows, Linux, and a Raspberry Pi running Rasbian. I am able to successfully connect, update firmware, and operate the arm but the arm will eventually freeze up. This freeze up seems to occur anywhere between 20 and 200 .play() move commands on my Pi and an embedded linux board using the i.MX7 processor.

The freeze up takes a little longer (after 1000 commands or so) on my Windows 10 laptop.

Once the arm freezes, .device() says that I am still connected however I get nothing but empty packets when monitoring the USB with an analyzer. I have tried different USB cables for all of my platforms.

Upon running .command({“state”:[0,1,2]}) I can also see that there are still unfinished commands in the queue (state 0 and 1). I noticed that there are always multiple (up to 4) commands in the queue with the state 1 when checking the queue upon freezing.

All my platforms are using Python3.7.3 and using the latest dorna api from github (not from pip as I was advised by dorna) and running an identical python script that has the arm pick up and place an imaginary item (if you check out the script I posted you will see that it is intended for fruit).

Any assistance by any source will be greatly appreciated!
DornaDemo2.0.txt

Hardcoded 'sudo'

Currently, for windows and *nix, sudo is hardcoded.

This is a code smell because

  • it gives access to root for any application that runs after this on the terminal
  • permission request can be escalated on failure with a non-root access
  • udev rules can eliminate requirement of sudo on several platforms
  • it requires any application that uses this code to be launched with sudo for a non-interactive use which is not always possible

Trouble Homing/Calibrating

Greetings,

I often experience trouble homing/calibrating joints J3 and J4 using the Python API v1.4.2. Please follow my steps below and let me know if I am misunderstanding the homing process.

>>> from dorna import Dorna
>>> r = Dorna(r"C:\Users\tloan\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\config.yaml")
>>> r.connect()
Progressing...
    100%  |████████████████████████████████|      7/7 commands
'{"id": "0084-084a-18c6-39c", "connection": 2, "port": "COM16", "fv": 1.21, "config": "C:\\\\Users\\\\True Loan\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37-32\\\\Lib\\\\site-packages\\\\dorna-1.4.2-py3.7.egg\\\\dorna\\\\config.yaml", "state": 0, "version": "1.4.2"}'
>>> r.home("j0")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.home("j1")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.home("j2")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.home("j3")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.play({"command":"move","prm":{"path":"joint","movement":0,"joint":[0,0,0,0,0]}})
'[{"id": 98, "state": 0, "error": null, "message": null, "command": "move", "fulfill": true, "key": null, "prm": {"path": "joint", "movement": 0, "joint": [0, 0, 0, 0, 0]}}]'
>>> #pic0 - we can see that j4 is not calibrated (the other joints look ok), the arrow should be pointing down

pic0

>>> r.play({"command":"move","prm":{"path":"joint","movement":1,"j4":90}})
'[{"id": 100, "state": 0, "error": null, "message": null, "command": "move", "fulfill": true, "key": null, "prm": {"path": "joint", "movement": 1, "j4": 90}}]'
>>> r.play({"command":"move","prm":{"path":"joint","movement":1,"j4":30}})
'[{"id": 102, "state": 0, "error": null, "message": null, "command": "move", "fulfill": true, "key": null, "prm": {"path": "joint", "movement": 1, "j4": 30}}]'
>>> r.play({"command":"move","prm":{"path":"joint","movement":1,"j4":10}})
'[{"id": 104, "state": 0, "error": null, "message": null, "command": "move", "fulfill": true, "key": null, "prm": {"path": "joint", "movement": 1, "j4": 10}}]'
>>> r.play({"command":"move","prm":{"path":"joint","movement":1,"j4":10}})
'[{"id": 106, "state": 0, "error": null, "message": null, "command": "move", "fulfill": true, "key": null, "prm": {"path": "joint", "movement": 1, "j4": 10}}]'
>>> #pic1 - the arrow is now pointing down and I will calibrate this to be 0 degrees for J4

pic1

>>> r.calibrate([0,0,0,0,0])
'[0, 0, 0, 0.0, 0.0]'
>>> r.save_config(r"C:\Users\True Loan\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\config.yaml")
'{"id": "0084-084a-18c6-39c", "connection": 2, "port": "COM16", "fv": 1.21, "config": "C:\\\\Users\\\\True Loan\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37-32\\\\Lib\\\\site-packages\\\\dorna-1.4.2-py3.7.egg\\\\dorna\\\\config.yaml", "state": 0, "version": "1.4.2"}'
>>> r.terminate()
>>> #pic2 - I powered off the arm, moved it back to the rest position, rotated J4 so it's not at 0 degrees, and then powered the arm back on

pic2

>>> r = Dorna(r"C:\Users\True Loan\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\config.yaml")
>>> r.connect()
Progressing...
    100%  |████████████████████████████████|      7/7 commands
'{"id": "0084-084a-18c6-39c", "connection": 2, "port": "COM16", "fv": 1.21, "config": "C:\\\\Users\\\\True Loan\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37-32\\\\Lib\\\\site-packages\\\\dorna-1.4.2-py3.7.egg\\\\dorna\\\\config.yaml", "state": 0, "version": "1.4.2"}'
>>> r.home("j0")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.home("j1")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.home("j2")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.home("j3")
'{"j0": 1, "j1": 1, "j2": 1, "j3": 1, "j4": 1}'
>>> r.play({"command":"move","prm":{"path":"joint","movement":0,"joint":[0,0,0,0,0]}})
'[{"id": 98, "state": 0, "error": null, "message": null, "command": "move", "fulfill": true, "key": null, "prm": {"path": "joint", "movement": 0, "joint": [0, 0, 0, 0, 0]}}]'
>>> r.position()
'[0, 0, 0, 0.0, 0.0]'
>>> #pic3 - we can see that J4 is not at 0 degrees. It seems like calibrating doesn't work for J4

pic3

TypeError : can't pickle JObject objects

using the API and PythonNet to control the robot in c#
sending a JSON object in the move() method raise an error

JObject prm = new JObject(new JProperty("movement", 1), new JProperty("path", "joint"), new JProperty("j0", 20)); robot_.move(prm);

error : Python.Runtime.PythonException: 'TypeError : can't pickle JObject objects'

error info:
File "C:\python37\lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\api.py", line 1904, in play
data = self.command({"id": id_list})
File "C:\python37\lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\api.py", line 955, in command
_result = self._command_mask(_result)
File "C:\python37\lib\site-packages\dorna-1.4.2-py3.7.egg\dorna\api.py", line 878, in _command_mask
x = copy.deepcopy(c)
File "C:\python37\Lib\copy.py", line 150, in deepcopy
y = copier(x, memo)
File "C:\python37\Lib\copy.py", line 241, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\python37\Lib\copy.py", line 169, in deepcopy
rv = reductor(4)

at Python.Runtime.PyObject.Invoke(PyTuple args, PyDict kw)
at Python.Runtime.PyObject.InvokeMethod(String name, PyTuple args, PyDict kw)
at Python.Runtime.PyObject.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
at CallSite.Target(Closure , CallSite , Object , JObject )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)

looks like the problem would be in deepcopy

Dorna arm speed 500 value is not working . toolhead very slow

Hi i am using dorna robot for pick place. also now testing with toolhead attached with servo based hand picker. i am using xyzab coordinates. while testing, a , b rotation speed is very slow and toolhead servo is very fast movement. it may break my object.

          once i restart the robot, it's going wrong co ordinates when i execute the same commands.

j0 Arm not working except during homing action

I'm running into the issue when performing rotating movements with j0 ,most of the times I'm hearing some weird sound in the stepper motor and j0 arm stuck at same position, I'm still connected with code however I get nothing except that sound.

I have tried even turning off dorna controller often when problem occurs and also I tried with same type of new stepper motor ,same issue happening.
During homing action of j0 it works as like,after some time if we instruct j0 arm to perform different movements, arm freezes there itself except producing weird sound,actually j0 motor responding to the instruction but no movement .
Other arms were working fine ,So this issue disturbs our requirement.Any assistance will be greatly appreciated!.

play fulfill does not work

When I send the following code below to the robot it does not fulfill each command as described in the documentation.

cmd1 = json.dumps({"command": "move", "prm": {"path": "joint", "movement": 0, "speed":1000, "j0": 90}, "fulfill": True})
robot.play(cmd1)
cmd2 = json.dumps({"command": "move", "prm": {"path": "joint", "movement": 0, "speed":1000, "j0": 0}, "fulfill": True})
robot.play(cmd2)

It will only work if I add the following below:

cmd1 = json.dumps({"command": "move", "prm": {"path": "joint", "movement": 0, "speed":1000, "j0": 90}, "fulfill": True})
robot.play(cmd1)
time.sleep(10)
cmd2 = json.dumps({"command": "move", "prm": {"path": "joint", "movement": 0, "speed":1000, "j0": 0}, "fulfill": True})
robot.play(cmd2)

Which seems weird since I thought "fulfill" parameter would handle this and also means I have to have my script stop so the robot can fulfill a command.

Permission settings for save_config() function

When running robot.save_config() you get:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/dorna-1.3-py3.6.egg/dorna/config.yaml'

This goes away if you run sudo or sudo -s before running the script, but maybe you could change the permissions when downloading everything?

Homing J3 & J4

Using Python 3.7.7 on Windows 7

from dorna import Dorna
r = Dorna()
r.connect()
r.home("j0")
r.home("j1")
r.home("j2")
r.home("j3")

91911959_2589998384616907_2013049389223772160_n

As you can see from the picture the joints 3 and 4 are really off. Bringing the joints to 0,0,0,0,0 and calibrating doesn't fix the problem.

Smooth motion between points

I use a really low jerk to slow down.
But i need that the movement does not wait a half a second in between.
This is for camera movement between points.

Installing Dorna in Python 3.7 (Linux)

In the README.md , where say

After download, go to the directory, and run:

python setup.py install

Keep in mind that in Ubuntu (or similar distributions), the Python 2.7 sometimes is factory installed, then you have to:

  • Install Python 3.7 (or newer)

sudo add-apt-repository ppa:jonathonf/python-3.7
sudo apt-get update
sudo apt-get install python3.7
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 0
sudo update-alternatives --config python3

After selecting version 3.7.

  • Download the repository of Dorna from Github
  • Extract the file, and Inside of the folder open the terminal and write:

sudo su
Enter your password and after, write

python3 setup.py install
(python setup.py install didn't work for me, but python3 setup.py install, yes)

No connection to the arm at all

After a few days of fail and error to connect the arm with my desktop, I hope you can help.

I used the arm before and everything works out fine, he did what he should do but now, I don´t even get a connection to the arm.
Maybe I should mention, that I don´t really have a plan of programming, I know some basics and how to use and interact with software.
image

Following a list of what i´ve done and which response I get from the software.
1.

  • a. Connecting the USB to the desktop

  • b. Starting the software

  • c. “refresh the USB port” and trying to connect

  • d. Response from the software:

i. Desktop\Dorna.2.2 Windows-64\dorna\api.py:2366: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
ii. Progressing...
iii. ('send: ', '{line:n}')
iv. ('sleep: :', 0.04999999999999993)
v. ('send: ', ' n 2')
vi. ('sleep: :', 0.04999999999999993)
vii. ('send: ', '{id: n, fv:n}')
viii. ('sleep: :', 0.04999999999999993)
ix. ('send: ', ' n 4')
x. ('sleep: :', 0.04999999999999993)

  • e. “reset device”

  • f. Response from the software

i. Progressing...
ii. Exception in thread Thread-30:
iii. Traceback (most recent call last):
iv. File "threading.py", line 917, in _bootstrap_inner
v. File "threading.py", line 865, in run
vi. File "subprocess.py", line 1238, in _readerthread
vii. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
viii. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
ix.
x. (IndexError('list index out of range'),)
xi. Exception in thread Thread-32:
xii. Traceback (most recent call last):
xiii. File "threading.py", line 917, in _bootstrap_inner
xiv. File "threading.py", line 865, in run
xv. File "subprocess.py", line 1238, in _readerthread
xvi. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
xvii. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
xviii.
xix. (IndexError('list index out of range'),)
xx. Exception in thread Thread-34:
xxi. Traceback (most recent call last):
xxii. File "threading.py", line 917, in _bootstrap_inner
xxiii. File "threading.py", line 865, in run
xxiv. File "subprocess.py", line 1238, in _readerthread
xxv. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
xxvi. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
xxvii.
xxviii. (IndexError('list index out of range'),)
xxix. Exception in thread Thread-36:
xxx. Traceback (most recent call last):
xxxi. File "threading.py", line 917, in _bootstrap_inner
xxxii. File "threading.py", line 865, in run
xxxiii. File "subprocess.py", line 1238, in _readerthread
xxxiv. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
xxxv. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
xxxvi.
xxxvii. (IndexError('list index out of range'),)
xxxviii. Exception in thread Thread-38:
xxxix. Traceback (most recent call last):
xl. File "threading.py", line 917, in _bootstrap_inner
xli. File "threading.py", line 865, in run
xlii. File "subprocess.py", line 1238, in _readerthread
xliii. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
xliv. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
xlv.
xlvi. (IndexError('list index out of range'),)
xlvii. Exception in thread Thread-40:
xlviii. Traceback (most recent call last):
xlix. File "threading.py", line 917, in _bootstrap_inner
l. File "threading.py", line 865, in run
li. File "subprocess.py", line 1238, in _readerthread
lii. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
liii. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
liv.
lv. (IndexError('list index out of range'),)
lvi. Exception in thread Thread-42:
lvii. Traceback (most recent call last):
lviii. File "threading.py", line 917, in _bootstrap_inner
lix. File "threading.py", line 865, in run
lx. File "subprocess.py", line 1238, in _readerthread
lxi. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
lxii. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
lxiii.
lxiv. (IndexError('list index out of range'),)
lxv. Exception in thread Thread-44:
lxvi. Traceback (most recent call last):
lxvii. File "threading.py", line 917, in _bootstrap_inner
lxviii. File "threading.py", line 865, in run
lxix. File "subprocess.py", line 1238, in _readerthread
lxx. File "c:\users\hossein\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
lxxi. UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 20: character maps to
lxxii.
lxxiii. (IndexError('list index out of range'),)

That´s it. I don´t know if the lines help, but maybe they´ll do.

All the best and thanks for helping me.

FineApple-de

Cannot connect to DORNA Virtual Robot

Hi, I am trying to connect to the Dorna virtual robot but it is not showing as a device on the wireless LAN. Does this virtual device even have an ip address? I have attached nMAP results. I don't know what to use to connect. The default comes up as ws://dorna:443 but that doesn't work.
nMap

when I set units to mm, joint speed seems to be affected as well

When I send a play command like the one below, which moves fine when I do not change the units to mm, moves incredibly slow when I load a config with units set to mm:

 cmd1 = json.dumps({"command": "move", "prm": {"path": "joint", "movement": 0, "speed":1000, "j0": 90}, "fulfill": True})
robot.play(cmd1)

I checked through the api and don't see any issues with the speed being overwritten after loading a config with units = mm, but was wondering if you could also replicate this issue on your end.

Issues with IO pins

I have an Arduino uno with a force sensor that when triggered turns a digital output pin on my board low. Since Arduino uno goes from 5V output I put the output through a voltage divider to match the 3.3V digital input pin on the control box. The gnd from the control box and my Arduino are connected so that there is a common gnd that can be referenced.

When the digital output pin from my Arduino goes low the voltage difference between gnd and input goes to 1.4V. My thoughts is that this is due to the pull resistor set on the input pins, but not 100% sure about this.

Any thoughts?

Cannot get servo to work using the API

Hi, I recently bought a digital servo that should work with 6V supply provided by the Dorna controller. I used the API to send a servo command

dorna = Dorna()
dorna.connect(port_name='/dev/ttyACM0')
dorna.servo(1500)

I did not see the servo move. If the arm is open, whenever I connect the servo, it closes all the way. After that, I do not see any movement. I am not sure what the relationship is between the input to servo function and the PWM. I tried all different values obviously 0, 500, 1500, 2000 (The manual suggested something between 0 and 1000). I also tried debugging what the command that is being sent by the computer. I saw that the computer sends M2 n 28 but does not seem to send the actual servo command. Is there anything I can do to get my servo running?

Thanks,
Gowtham.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.