Skip to content

Commit

Permalink
fix tag feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jun 15, 2017
1 parent 984122f commit 6a0f25f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6
julia 0.6-
ODE
RecipesBase
Requires
9 changes: 4 additions & 5 deletions src/two_link.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module TwoLink

export torque, forward_kin, inverse_kin, inverse_kin_up, inverse_kin_down, traj, connect_points, acceleration, time_derivative, inertia
import Base: +
+(a::Tuple{Number,Number}, b::Tuple{Number,Number}) = (a[1]+b[1], a[2]+b[2])
export torque, forward_kin, inverse_kin, inverse_kin_up, inverse_kin_down, traj, connect_points, acceleration, time_derivative, time_derivative!, inertia,
(a::Tuple{Number,Number}, b::Tuple{Number,Number}) = (a[1]+b[1], a[2]+b[2])

const v1 = const v2 = 2
const m1 = const m2 = 0.2
Expand Down Expand Up @@ -41,7 +40,7 @@ function torque(q,qd,qdd)
τ2 = m2*l1*l2*c2*qdd1 + m2*l1*l2*s2*qd1^2 + m2*l2*g*s12 +
m2*l2^2*(qdd1 + qdd2) + v2*qd2 + k2*signfunc(qd2)

[τ1,τ2]
(τ1,τ2)
end

"""
Expand Down Expand Up @@ -91,7 +90,7 @@ end
function forward_kin(q)
q1,q2 = q[1],(q[1]+q[2])
p1 = (l1*sin(q1), -l1*cos(q1))
p = p1 + (l2*sin(q2), -l2*cos(q2))
p = p1 (l2*sin(q2), -l2*cos(q2))
p1, p
end

Expand Down

0 comments on commit 6a0f25f

Please sign in to comment.