Skip to content

Commit

Permalink
add dummy link
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailChaikovskii committed Aug 11, 2024
1 parent 524662a commit 7fb3cbc
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 87 deletions.
4 changes: 2 additions & 2 deletions rostok/block_builder_chrono/blocks_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def evaluate(self, time, rest_angle, angle, vel, link):
torque: torque, that is created by spring
"""
torque = 0

torque = -self.spring_coef * (angle - rest_angle) - self.damping_coef * vel
if self.spring_coef > 10**-5:
torque = -self.spring_coef * (angle - rest_angle) - self.damping_coef * vel
# if angle <= 0:
# torque = -self.spring_coef * (angle - rest_angle) - self.damping_coef * vel
# else:
Expand Down
2 changes: 1 addition & 1 deletion rostok/criterion/simulation_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def __init__(self):
super().__init__()

def event_check(self, current_time: float, step_n: int, robot_data: Sensor, env_data: Sensor):
if step_n == 0:
if step_n <=3:
n_contacts = env_data.get_amount_contacts()
if n_contacts[0] > 0:
return EventCommands.STOP
Expand Down
Loading

0 comments on commit 7fb3cbc

Please sign in to comment.