Giter Club home page Giter Club logo

Comments (7)

studywolf avatar studywolf commented on May 24, 2024 1

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.

quartzolit avatar quartzolit commented on May 24, 2024

And in case for osc.generate scenario? What should I do to repair this problem of xyz_offset?

from abr_control.

studywolf avatar studywolf commented on May 24, 2024

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.

quartzolit avatar quartzolit commented on May 24, 2024

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.

studywolf avatar studywolf commented on May 24, 2024

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.

quartzolit avatar quartzolit commented on May 24, 2024

Oh...Got it now. Sorry by my misunderstanding. Now it makes perfect sense

from abr_control.

studywolf avatar studywolf commented on May 24, 2024

No problem! Happy to help :)

from abr_control.

Related Issues (20)

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.