Comments (7)
Hello! Ah, this is because the xyz_offset
parameter actually refers to an xyz offset in task space (i.e. the hand is assumed to be at [0, 0, 0] in the last coordinate frame on the robot, specifying xyz_offset
changes the hand location in the last coordinate frame), not in allocentric coordinates.
So for your case instead of using that parameter you can just add the xyz position of the base of the arm to the output from robot_config.Tx
.
start = robot_config.Tx("EE", feedback["q"]) + np.array(base)
should give you what you want, I believe.
from abr_control.
And in case for osc.generate scenario? What should I do to repair this problem of xyz_offset?
from abr_control.
Hm, I'm sorry I need a bit more information. Do you mean the target coordinates need to have the rover position subtracted before being passed into osc.generate
? My guess is that you don't require the xyz_offset
parameter.
from abr_control.
As far as I know, I need to tell the base coordinates of the arm, because inside the generate function is calculated the Tx and jacobian of each joint and link. If i don't pass any value in xyz_offset, it will be generated a distance of the end-effector and the target. But the end-effector will be calculated based on his base at [0,0,0]. And if the distance is too high of the origin. The results of torque u goes insanely high. If I pass it the way it is now, xyz_offset will be measured according to task space, correct? In this case I'll receive torque based on this coordinates [-0.33954067 1.79179413 -8.71078803]
base = interface.get_xyz("UR5_link0_visible")
result: Base is: [-9.712021827697754, 1.791999101638794, 0.16733066737651825]
start = robot_config.Tx("EE", feedback["q"]) + np.array(base)
result: start is: [-9.88423183 1.79179413 1.16856447] (this solved the first problem)
u = ctrlr.generate(q=feedback["q"], dq=feedback["dq"], target=target,)
result: u values are: [62.58568618 88.65189519 29.98363745 2.13804257 -7.78033134 -0.15512129]
from abr_control.
I would guess that you also need to subtract the base location from the target position, because the target needs to be passed in in robot-centric coordinates not world coordinates.
e.g.
u = ctrlr.generate(q=feedback['q'], dq=feedback['dq'], target=target-np.array(base))
edit: fixed a typo
from abr_control.
Oh...Got it now. Sorry by my misunderstanding. Now it makes perfect sense
from abr_control.
No problem! Happy to help :)
from abr_control.
Related Issues (20)
- Add a warning when the joint state is ignored by mujoco_config
- AttributeError: 'MjViewer' object has no attribute 'exit' HOT 1
- Question for the hand/gripper control HOT 2
- Can we add AvoidObstacles in inverse kinematics path planner? HOT 1
- Non-linear trajectory issue HOT 6
- config.py file for UR5e
- Control of two robots
- 3D model files missing HOT 2
- AttributeError: 'MjViewer' object has no attribute 'exit' HOT 3
- error occurs when calculation of 'C' HOT 6
- What is the effect of dt in your expressions? HOT 4
- Can I download those mesh and texture files directly? HOT 2
- Other arms with ABR_Control HOT 2
- Inverse kinematic for Mujoco HOT 3
- ask for reference about the controllers HOT 3
- Dynamics Adaptation using hardcoded Tau and dt values HOT 2
- TypeError: 'numpy.ndarray' object is not callable HOT 2
- MujocoConfig Error HOT 3
- Mujoco install issues I encountered. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abr_control.