Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to scale the trajectory #12

Open
deepakraina99 opened this issue Mar 19, 2021 · 1 comment
Open

Not able to scale the trajectory #12

deepakraina99 opened this issue Mar 19, 2021 · 1 comment

Comments

@deepakraina99
Copy link

deepakraina99 commented Mar 19, 2021

I am running the code using the following command:

python run.py arm3 dmp write --sequence 333 --scale 123

But this is not scaling the trajectory. I am attaching the plot here for your reference.

Screenshot from 2021-03-19 10-33-35

@studywolf
Copy link
Owner

Hi! So it looks like this feature is not really easy to use for writing, and the scaling is, I believe actually intended as a scaling term for the force field. There are a couple of ways you can do scale the writing, though. The first is just in the write.py file you can change the writebox parameter to make the set of drawn numbers / letters the size that you want. This changes the target trajectory.
With DMPs, however, the idea is that you just change the goal position and they do the scaling for you automatically. So the second is you can go into the dmp.py controller and after line 94 add in code specifying what you want the goal to be. For drawing the number 3 this goal works well:

        self.dmps.goal[0] = -0.5
        self.dmps.goal[1] = 1

But basically, I would recommend switching over to the ABR Control repository, which was based on this repo, but is much cleaner and actively maintained. It doesn't have some of the features of the studywolf control repo, but overall it's much easier to use. And then when you're in that repo there is this example which uses DMPs, and can be used as a template for implementing the same functionality here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants