tud-phi / ros2-elastica

ROS2 package implementing Elastica
0 stars 0 forks source link

Put the simulation variables into a dictionary #7

Closed mstoelzle closed 2 years ago

mstoelzle commented 2 years ago

I think it might make sense to put the simulation variables into a dictionary, so that the passing of these variables into functions and methods gets easier and if something in the simulator backend changes, you can easily add more variables to the dict.

https://github.com/tud-cor-sr/ros2-elastica/blob/testing_versions/src/ros2_elastica_pack/ros2_elastica_pack/examples/ContinuumFlagellaCase/continuum_flagella_ros2.py#L45

RUFFY-369 commented 2 years ago

Hi @mstoelzle, Yeah I was going to use defaultdict or normal dictionary for this purpose like how we're storing the simulation data in the script. Thank you for suggesting this for the refactoring of the code, was helpful. The changes for it has been pushed with the latest commit

mstoelzle commented 2 years ago

It looks good now!