openworm / robots

C. elegans robots
http://tom.portegys.com/research.html#c_elegans_robot
25 stars 13 forks source link

wormpy.py in WormHost doesn't have get_segment_angles method! #8

Open LucianSheen opened 11 months ago

LucianSheen commented 11 months ago

I tried to add: def get_segment_angle(segment): return _wormpy.get_segment_angle(segment) get_segment_angle = _wormpy.get_segment_angle

but it seems _wormpy.pyd doesn't have get_segment_angle either.

portegys commented 11 months ago

Looks like that function is missing. If you want to read the segment angles though they are in a file called "segment_angles.txt" and code in worm_run_segment_angles.py reads the file and moves the robot.

On Tue, Sep 19, 2023 at 2:39 PM LucianSheen @.***> wrote:

I tried to add: def get_segment_angles(segment): return _wormpy.get_segment_angles(segment) get_segment_angles = _wormpy.get_segment_angles

but it seems _wormpy.pyd doesn't have get_segment_angles either.

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3XMGJXCOV2IRBT6652LTX3HYFPANCNFSM6AAAAAA46ZZFFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

LucianSheen commented 11 months ago

Thanks for the reply, portegys! But also I am wondering then how come the segment angle text file was generated, had a look at the worm_gen_segment_angles.py and it basically has got missing functions as well(also incl.get_segment_angles). As I can not decode the _wormpy.pyd file, it made me wonder if the project itself is more about worms' locomotion, rather than recreating c.elegans' connectome in robotics?

Best, Lucian

portegys commented 11 months ago

Hi Lucian, We actually got the angles from running the code associated with this project: Boyle, Berri and Cohen, "Gait modulation in C. elegans: an integrated neuromechanical model", Front. Comput. Neurosci., 2012. Which is a physics simulation of the worm. Tom

On Tue, Sep 19, 2023 at 4:33 PM LucianSheen @.***> wrote:

Thanks for the reply, portegys! But also I am wondering then how come the segment angle text file was generated, had a look at the worm_gen_segment_angles.py and it basically has got missing functions as well(also incl.get_segment_angles). As I can not decode the _wormpy.pyd file, it made me wonder if the project itself is more about worms' locomotion, rather than recreating c.elegans' connectome in robotics?

Best, Lucian

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1726532512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3XMCVYCSXLOYYY7QFJV3X3IFTVANCNFSM6AAAAAA46ZZFFQ . You are receiving this because you commented.Message ID: @.***>

LucianSheen commented 11 months ago

Hello Tom! yes I have read the document just now and realised it is based on their research, sorry for that. I wanted to get this code work with a flexibility of different number of servos like 12 or 16, as per apparently the code was originally designed to be like?

Best, Lucian

portegys commented 11 months ago

Oh right. The worm actually has 12 segments, but we cut it down to 8 or so for the robot.

On Tue, Sep 19, 2023 at 4:51 PM LucianSheen @.***> wrote:

Hello Tom! yes I have read the document just now and realised it is based on their research, sorry for that. I wanted to get this code work with a flexibility of different number of servos like 12 or 16, as per apparently the code was originally designed to be like?

Best, Lucian

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1726566007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3XMAPQK4P7UPLI6PNPYLX3IHURANCNFSM6AAAAAA46ZZFFQ . You are receiving this because you commented.Message ID: @.***>

LucianSheen commented 11 months ago

Thanks! could you please kindly let me know what I should do if I want to run and make my own simulation model and create angle text file based on the simulation?

Many Thanks, Lucian

On Wed, 20 Sep 2023 at 00:53, Tom Portegys @.***> wrote:

Oh right. The worm actually has 12 segments, but we cut it down to 8 or so for the robot.

On Tue, Sep 19, 2023 at 4:51 PM LucianSheen @.***> wrote:

Hello Tom! yes I have read the document just now and realised it is based on their research, sorry for that. I wanted to get this code work with a flexibility of different number of servos like 12 or 16, as per apparently the code was originally designed to be like?

Best, Lucian

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1726566007, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAF3XMAPQK4P7UPLI6PNPYLX3IHURANCNFSM6AAAAAA46ZZFFQ>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1726691890, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7G37LVRIMOX7M7TCDEJUULX3IWA3ANCNFSM6AAAAAA46ZZFFQ . You are receiving this because you authored the thread.Message ID: @.***>

portegys commented 11 months ago

Here is a link with the code to run the simulation and generate both the segment angles (all 12 of them) and the muscle activations. There are also makefiles, visual studio files, and python scripts to run it. https://www.dropbox.com/scl/fi/5y9ojiby948nrsxr89py7/WormSim.zip?rlkey=gpvsx1dlug6z06cyb2p6flimw&dl=0 Tom

On Mon, Sep 25, 2023 at 6:45 AM LucianSheen @.***> wrote:

Thanks! could you please kindly let me know what I should do if I want to run and make my own simulation model and create angle text file based on the simulation?

Many Thanks, Lucian

On Wed, 20 Sep 2023 at 00:53, Tom Portegys @.***> wrote:

Oh right. The worm actually has 12 segments, but we cut it down to 8 or so for the robot.

On Tue, Sep 19, 2023 at 4:51 PM LucianSheen @.***> wrote:

Hello Tom! yes I have read the document just now and realised it is based on their research, sorry for that. I wanted to get this code work with a flexibility of different number of servos like 12 or 16, as per apparently the code was originally designed to be like?

Best, Lucian

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1726566007,

or

unsubscribe <

https://github.com/notifications/unsubscribe-auth/AAF3XMAPQK4P7UPLI6PNPYLX3IHURANCNFSM6AAAAAA46ZZFFQ>

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1726691890, or unsubscribe < https://github.com/notifications/unsubscribe-auth/A7G37LVRIMOX7M7TCDEJUULX3IWA3ANCNFSM6AAAAAA46ZZFFQ>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/openworm/robots/issues/8#issuecomment-1733503120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3XMAV7YPL6P2QYQDZHNTX4FVE7ANCNFSM6AAAAAA46ZZFFQ . You are receiving this because you commented.Message ID: @.***>