Open
Description
Component definitions like this are okay inside the @mtkmodel
macro
if inertial_wheels
front_wheels = RollingWheelSet(radius=wheel_radius, m_wheel=wheel_mass, I_axis, I_long, track=wheel_d, state_priority=100)
else
front_wheels = RollingWheelSetJoint(radius=wheel_radius, track=wheel_d, state_priority=100)
end
if inertial_wheels
rear_wheels = RollingWheelSet(radius=wheel_radius, m_wheel=wheel_mass, I_axis, I_long, track=wheel_d, state_priority=100, iscut=true)
else
rear_wheels = RollingWheelSetJoint(radius=wheel_radius, track=wheel_d, state_priority=100, iscut=true)
end
but putting both components in the same if statement
if inertial_wheels
front_wheels = RollingWheelSet(radius=wheel_radius, m_wheel=wheel_mass, I_axis, I_long, track=wheel_d, state_priority=100)
rear_wheels = RollingWheelSet(radius=wheel_radius, m_wheel=wheel_mass, I_axis, I_long, track=wheel_d, state_priority=100, iscut=true)
else
front_wheels = RollingWheelSetJoint(radius=wheel_radius, track=wheel_d, state_priority=100)
rear_wheels = RollingWheelSetJoint(radius=wheel_radius, track=wheel_d, state_priority=100, iscut=true)
end
errors with front_wheels
not defiend.
This problem appears in @equations
as well, one can only have one equation per branch at the moment.