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

ball rolling on a spinning disc #210

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

Peter230655
Copy link
Contributor

@Peter230655 Peter230655 commented Aug 21, 2024

A ball rolls on a spinning disc. opty's job is to get it to the center. Now setting up the oems once only, for both reaction forces and optimization works. You may recall, that I did not manage earlier, but noew it worked without any problems. No idea what I did wrong before.

@Peter230655
Copy link
Contributor Author

What is the meaning of the test which failed? It ran fine with me.
Thanks!

# If the ball rotates around the x axis by an angle :math:`q_1`
# the contact point will be move by :math:`-q_1 \cdot r` in the :math:`\hat{A2}.y`
# direction. If the ball rotates around the y axis by an angle :math:`q_2` the
# contact point will be move by :math:`q_2 \cdot r` in the :math:`\hat{A2}.x`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:math:\hat{A2}.x`` is unusual math notation. It should at least be _x, but above you also have the `2` and subscript.

# direction. Hence the configuration constraints are:
#
# - :math:`x = r \cdot q_2`
# - :math:`y = -r \cdot q_1`
Copy link
Member

@moorepants moorepants Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if we didn't use \cdot for scalar multiplication. There isn't much reason to add a symbol for scalar multiplication, i.e. $ab$ means $a\cdot b$.

# As :math:`T(t) = const \cdot t` I set these derivatives accordingly.

# %%
# I do not use qdisc = sm.integrate(udisc, t), as this gives
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# I do not use qdisc = sm.integrate(udisc, t), as this gives
# I do not use ``qdisc = sm.integrate(udisc, t)``, as this gives


# %%
# I do not use qdisc = sm.integrate(udisc, t), as this gives
# a sm.Piecewise(..) result, likely not differentiable everywhere,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# a sm.Piecewise(..) result, likely not differentiable everywhere,
# a ``sm.Piecewise(..)`` result, likely not differentiable everywhere,

@Peter230655
Copy link
Contributor Author

I will make all the changes you suggested and push again this afternoon.
Thanks!

@moorepants moorepants merged commit 3e3667a into csu-hmc:master Sep 9, 2024
21 checks passed
@moorepants
Copy link
Member

It is in. Thanks.

@Peter230655
Copy link
Contributor Author

It is in. Thanks.

Thank YOU!!

@Peter230655 Peter230655 deleted the plot_ball_rolling branch September 9, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants