RW Factory Bug u_min

24 views
Skip to first unread message

Tom B.

unread,
Nov 4, 2022, 10:07:33 AM11/4/22
to Basilisk Forum
Hi all,

I noticed a small bug when using the rw factory for creating a custom reaction wheel config: the minimum torque parameter can be set in the function rwFactory.create(... u_min=0.1, useMinTorque=True), but the code does not set the u_min parameter of the created rw object. So u_min stays at 0.0 and the useMinTorque does not have any effect.

u_max is set in line 179 in simIncludeRW.py, u_min is missing:

if 'u_min' in kwargs:
     varu_min = kwargs['u_min']
     if not isinstance(varu_min, (float)):
         print('ERROR: u_min must be a FLOAT argument')
         exit(1)
    RW.u_min = varu_min
if RW.u_min <= 0.0 and varUseMinTorque:
     print('ERROR: RW is being setup with non-positive u_min value with varUseMinTorque set to True')
     exit(1)

Unfortunately I don't have rights for the bitbucket  repo, so I can't issue a pull request.

Cheers
Tom

Hanspeter Schaub

unread,
Nov 5, 2022, 2:15:25 AM11/5/22
to Basilisk Forum
Mm, I'll look into this.  Might be a few days before I get to this.

Riccardo Calaon

unread,
Nov 8, 2022, 1:39:35 PM11/8/22
to Basilisk Forum
Hi Tom,

Thanks for pointing out this issue. It should have been resolved now, those lines of code have been added to the simIncludeRW.py file.
You can pull the updated code from the latest develop.

Best,
Riccardo Calaon

Reply all
Reply to author
Forward
0 new messages