Welcome to robotics-toolbox-python Discussions! #158
Replies: 17 comments 15 replies
-
Hi Peter, I have found two errors to run the code in Kinematics.ipynb file: Error 2. The line below do not run, Can you please provide your valuable advise regarding these problems? |
Beta Was this translation helpful? Give feedback.
-
Sent from my iPad
On 17 Mar 2021, at 8:40 am, ffaria431 ***@***.***> wrote:
Hi Peter,
I have found two errors to run the code in Kinematics.ipynb file:
Error 1. "Could not connect to the Swift simulator" during running the code below
env = rtb.backends.Swift() # instantiate 3D browser-based visualizer
env.launch() # activate it
env.add(robot) # add robot to the 3D scene
for qk in qt.q: # for each joint configuration on trajectory
robot.q = qk # update the robot state
env.step() # update visualization
This is due to recent backend changes, easiest way to use Swift is the
backend=‘swift’
Option to plot.
Error 2. The line below do not run,
p560.plot(p560.qn);
What was the error?
… Can you please provide your valuable advise regarding these problems?
Thanks in advance!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Pls give me a complete example that shows the problem
Peter.
…Sent from my iPhone
On 17 Mar 2021, at 1:22 pm, ffaria431 ***@***.***> wrote:
Error was "IPython is not defined".
Moreover, during running qt.q , this error is occurred : "'Trajectory' object has no attribute 'q'" . Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
I have another query. I am working with C-Arm kinematics. I need to create DH table for 10 DOF for C-Arm. Do you have any materials or code to create DH parameter for own piece of Robot? Thanks a million. I really appreciate your worthy time and assistance. |
Beta Was this translation helpful? Give feedback.
-
When calculating the inverse kinematics, the program returns a list of numbers representing the joint angles. How would I call these angles individually so they can be converted into something like motor movement? I cannot find what their variable names are. |
Beta Was this translation helpful? Give feedback.
-
Correct! The object contains other useful status information as well.
The kinematic notebook and the top level README explain this
…Sent from my iPad
On 18 Apr 2021, at 11:08 am, McRobot ***@***.***> wrote:
I guess I put this out a little too soon and found out shortly after. For anyone wondering the same thing, the individual joint angles from the inverse kinematics can be called by using sol.q[n] where n is the joint number.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
When creating a new DH model, I can enter alpha, d, and a, but I cannot enter the theta column from my DH table. Is there a way to do this or a different way around this? |
Beta Was this translation helpful? Give feedback.
-
Question: How to Import my robot.URDF to python in such a way to get all properties (M, C, J, ...) same as MATLAB Robotics Toolbox. Explanation: clc I think It can be done manually by defining DH and Mechanical properties to create DHRobot. However, a simple way would be much appreciated. |
Beta Was this translation helpful? Give feedback.
-
I'm having some trouble with plotting. I have tried different ways to plot several robots, and I usually end up with this error:
Python says the error comes from these lines.
This also shows a blank plot with no robot in it. Does anyone know how to fix this? |
Beta Was this translation helpful? Give feedback.
-
Please, you need to be more precise in what you write if you want help.
On 17 Mar 2021, at 8:40 am, ffaria431 ***@***.***> wrote:
Hi Peter,
I have found two errors to run the code in Kinematics.ipynb file:
Error 1. "Could not connect to the Swift simulator" during running the code below
env = rtb.backends.Swift() # instantiate 3D browser-based visualizer
env.launch() # activate it
env.add(robot) # add robot to the 3D scene
for qk in qt.q: # for each joint configuration on trajectory
robot.q = qk # update the robot state
env.step() # update visualization
there is no code like this in the .ipynb file
Error 2. The line below do not run,
p560.plot(p560.qn);
as in the fourth cell in the notebook? Send error messages.
… Can you please provide your valuable advise regarding these problems?
Thanks in advance!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#158 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2BIURYY62IP4NPGXMDYCLTD7M63ANCNFSM4US6VCBQ>.
|
Beta Was this translation helpful? Give feedback.
-
How are you creating the trajectory object?
… On 30 Apr 2021, at 6:58 am, McRobot ***@***.***> wrote:
I'm having some trouble with plotting. I have tried different ways to plot several robots, and I usually end up with this error.
AttributeError: 'Trajectory' object has no attribute 'q'
Python says the error comes from these lines.
qt = rtb.jtraj(beep, q_pickup, 50)
robot.plot(qt.q, movie='panda1.gif')
This also shows a blank plot with no robot in it. Does anyone know how to fix this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#158 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2BIUXZMG77AHSJ2HYICFDTLHB7VANCNFSM4US6VCBQ>.
|
Beta Was this translation helpful? Give feedback.
-
robot = ERobot.URDF(urdf file name)
should create an ERobot instance from the file. Inertial information, if present will be read in. You can display the kinematic params
by
print(robot)
and the inertial params by
robot.dynamics()
peter
… On 29 Apr 2021, at 3:26 pm, Adineh94 ***@***.***> wrote:
Question: How to Import my robot.URDF to python in such a way to get all properties (M, C, J, ...) same as MATLAB Robotics Toolbox.
Explanation:
Because of some reason, I have to move to python.
It was very easy and straightforward to import our serial robot(URDF format) in Matlab, for example:
clc
clear
robotCadName = 'mySerialRobot.urdf';
[folderName,~] = split(robotCadName,'.');
meshPath = fullfile(pwd, 'CADModel', 'URDF', folderName1{1});
robot = importrobot(robotCadName,'MeshPath', meshPath);
clearCollision(robot.Base)
clearVisual(robot.Base)
I think It can be done manually by defining DH and Mechanical properties to create DHRobot. However, a simple way would be much appreciated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#158 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2BIUSAJQE5TEH3MM2WO43TLDUZVANCNFSM4US6VCBQ>.
|
Beta Was this translation helpful? Give feedback.
-
What version are you running, pypi or GitHub?
…Sent from my iPad
On 30 Apr 2021, at 2:24 pm, Adineh94 ***@***.***> wrote:
Hi Peter, Many Thanks!
Error:
I have tested, but I have received the following error:
AttributeError: type object 'ERobot' has no attribute 'URDF'
My Code:
from roboticstoolbox import ERobot
import os
pwd = os.getcwd()
pth = os.path.dirname(pwd)
urdf_loc = pth + "\two_links_robot\two_links_robot.urdf"
robot = ERobot.URDF(urdf_loc)
Extra Explanation:
As a simple example, I've created a two links robot by Solidwork and export it as URDF. That creates a create URDF as a package (For example "mesh filename="package://two_links_robot/meshes/Base.STL" />" for Base) which directly can be loaded to MATLAB. However, I have found this should be modified for some URDF readers such as urdfpy. Both files have been attached.
+++++++++++++++++++++++++++++++ Code ++++++++++++
from urdfpy import URDF
import os
import numpy as np
pwd = os.getcwd()
pth = os.path.dirname(pwd)
urdf_loc = pth + "\two_links_robot\two_links_robot.urdf"
robot = URDF.load(urdf_loc)
robot.animate(cfg_trajectory={
'q0': [-np.pi / 4, np.pi / 4],
'q1': [0.0, -np.pi / 2.0],
})
two_links_robot - Modified.zip
two_links_robot.zip
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Did you install it with Pip or git clone?
…Sent from my iPad
On 1 May 2021, at 10:28 am, McRobot ***@***.***> wrote:
I'm not sure. Is there any way to check this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
The version on GH has the ability to read URDF
ERobot.URDF(filename)
You don’t need urdfpy.
Peter
… On 1 May 2021, at 11:10 am, McRobot ***@***.***> wrote:
I believe git clone, but I tried both ways and had some trouble and eventually got it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#158 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2BIURLRLRIFGI5VFH5EDLTLNIG5ANCNFSM4US6VCBQ>.
|
Beta Was this translation helpful? Give feedback.
-
I'd prefer that discussions like this happen in Issues not here in discussion. Issues is much better suited for that. I will delete all these posts in a few ays. |
Beta Was this translation helpful? Give feedback.
-
@petercorke Is there a way to do self collision checking? I see the iscollided function, but it seems this is for checking if any of the arm links have collided with an external shape as you have to pass in the joint angles and a shape. But I'm wondering if there is a way to check if any of the arm links are colliding with each other in a certain joint angle configuration. I've checked that my links have collision geometry, and even tried passing in a link geometry to the iscollided function, but it always returns true in this case since this function cycles through the links and checks if they have collided with the shape (in this case, a link will have collided with itself). |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
The Robotics Toolbox for Python is a new project, inspired by its MATLAB version, and we're still actively working on it.
We’re using Discussions as a place to connect with users and potential contributors. We hope that you:
build together 💪.
This is not the place for bug reports. For bugs please create an Issue
Beta Was this translation helpful? Give feedback.
All reactions