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

Other side MTKv9 #61

Merged
merged 8 commits into from
Jun 12, 2024
Merged

Other side MTKv9 #61

merged 8 commits into from
Jun 12, 2024

Conversation

baggepinnen
Copy link
Contributor

@baggepinnen baggepinnen commented Jun 5, 2024

@baggepinnen
Copy link
Contributor Author

Benchmark

using ModelingToolkit
using Multibody
using JuliaSimCompiler
using OrdinaryDiffEq

@time "full robot" begin 
    @named robot = Robot6DOF(trivial=false)
    robot = complete(robot)
    ssys = structural_simplify(IRSystem(robot))
    prob = ODEProblem(ssys, [
        robot.mechanics.r1.phi => deg2rad(-60)
        robot.mechanics.r2.phi => deg2rad(20)
        robot.mechanics.r3.phi => deg2rad(90)
        robot.mechanics.r4.phi => deg2rad(0)
        robot.mechanics.r5.phi => deg2rad(-110)
        robot.mechanics.r6.phi => deg2rad(0)
        robot.axis1.motor.Jmotor.phi => deg2rad(-60) * (-105) 
        robot.axis2.motor.Jmotor.phi => deg2rad(20) * (210)
        robot.axis3.motor.Jmotor.phi => deg2rad(90) * (60)
    ], (0.0, 4.0))
    sol = solve(prob, Rodas5P());

    tv = 0:0.01:4
    # Extract data (this time is included in modelica timings)
    data = sol(tv, idxs=[
        robot.pathPlanning.controlBus.axisControlBus1.angle
        robot.pathPlanning.controlBus.axisControlBus2.angle
        robot.pathPlanning.controlBus.axisControlBus3.angle
        robot.pathPlanning.controlBus.axisControlBus4.angle
        robot.pathPlanning.controlBus.axisControlBus5.angle
        robot.pathPlanning.controlBus.axisControlBus6.angle
        robot.mechanics.r1.phi
        robot.mechanics.r2.phi
        robot.mechanics.r3.phi
        robot.mechanics.r4.phi
        robot.mechanics.r5.phi
        robot.mechanics.r6.phi
    ]);
end

Base automatically changed from MTKv9 to main June 12, 2024 12:56
@baggepinnen baggepinnen marked this pull request as ready for review June 12, 2024 12:57
@baggepinnen baggepinnen merged commit 08d3231 into main Jun 12, 2024
0 of 2 checks passed
@baggepinnen baggepinnen deleted the other_side_MTKv9 branch June 12, 2024 12:57
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

Successfully merging this pull request may close these issues.

1 participant