-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into simulation_scenario…
…/external_force
- Loading branch information
Showing
17 changed files
with
877 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from rostok.block_builder_chrono.block_builder_chrono_api import \ | ||
ChronoBlockCreatorInterface | ||
|
||
|
||
def calc_volume_body(blueprint): | ||
"""Calculate the volume of the body.""" | ||
body = ChronoBlockCreatorInterface.init_block_from_blueprint(blueprint) | ||
volume = body.body.GetMass() / body.body.GetDensity() | ||
return volume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from dataclasses import dataclass, field | ||
|
||
from rostok.control_chrono.external_force import ForceControllerTemplate | ||
|
||
|
||
@dataclass | ||
class ForceTorqueContainer: | ||
controller_list: list[ForceControllerTemplate] = field(default_factory=list) | ||
|
||
def update_all(self, time: float, data=None): | ||
for i in self.controller_list: | ||
i.update(time, data) | ||
|
||
def add(self, controller: ForceControllerTemplate): | ||
if controller.is_bound: | ||
self.controller_list.append(controller) | ||
else: | ||
raise Exception("Force controller should be bound to body, before use") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.