Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing modules #1

Open
x75 opened this issue Apr 1, 2019 · 18 comments
Open

Missing modules #1

x75 opened this issue Apr 1, 2019 · 18 comments

Comments

@x75
Copy link
Owner

x75 commented Apr 1, 2019

When I try to run your text files(sphero_raw.py or shpero_res_learner_1d.py, e.t.c...) I get the error message: No module named reservoirs

@x75
Copy link
Owner Author

x75 commented Apr 1, 2019

first one is smp_msgs.msg.reservoir

quick fix is to git clone smp_msgs repository into your ros-workspace/src and run catkin

cd ws-kinetic-py3/src
git clone [email protected]:x75/smp_msgs.git
cd ..
catkin_make_isolated install

better but more effort is to replace the reservoir message with just FloatArray from std_msgs, didn't know back then.

@x75
Copy link
Owner Author

x75 commented Apr 1, 2019

second one is you'll need Reservoir class from reservoirs.py, which has moved to smp_base and become smp_base.models_reservoirs. smp_base is available as well but you'd need to edit the imports.

@x75
Copy link
Owner Author

x75 commented Apr 1, 2019

queued and WIP, will be back with fixes but may take a bit

@NevilleKitala
Copy link

Thank you for your reply. I will work on this right now

@NevilleKitala
Copy link

I have updated the import statements. But a new error comes up:

ImportError for rlspy
("Couldn't import init_jpype from measures_infth, make sure jpype is installed", ImportError('No module named config',))
Traceback (most recent call last):
File "src/smp_sphero/sphero_res_learner_1D.py", line 21, in
from smp_base.models_learners import learnerEH
File "/home/neville/Ros_Workspace/src/smp_base/smp_base/models_learners.py", line 702, in
class learnerReward(object):
File "/home/neville/Ros_Workspace/src/smp_base/smp_base/models_learners.py", line 794, in learnerReward
@dec_compute_infth_soft()
NameError: name 'dec_compute_infth_soft' is not defined.

I assumed perhaps that I didn't have the jpype installed but I ran :

sudo apt-get install python-jpype
but the error persists. Any advice on this issue?

@x75
Copy link
Owner Author

x75 commented Apr 3, 2019

sorry for the mess and thx for patience, let me try and fix the packages deps today, be back when done sometime tonight.

@NevilleKitala
Copy link

Appreciate the speedy reply. Many Thanks.

@x75
Copy link
Owner Author

x75 commented Apr 4, 2019

are you on py2 or 3?

@NevilleKitala
Copy link

I'm using py2

@x75
Copy link
Owner Author

x75 commented Apr 4, 2019

replaced offending imports, if you have smp_base in your PATH it might just work. lmk.

@NevilleKitala
Copy link

I'm going to try it now. Thank you

@NevilleKitala
Copy link

I would like to report that this error persists. I had updated the local repository I had originally pulled. The issue is in model_learners:

line 794, in learnerReward
@dec_compute_infth_soft()
NameError: name 'dec_compute_infth_soft' is not defined.

The system recommendations were to install jpype but I already have that installed.

@NevilleKitala
Copy link

Please explain what the @dec_compute_infth_soft() function does.

@x75
Copy link
Owner Author

x75 commented Apr 4, 2019

ah seems i forgot about the second issue. you'll need jpype, infodynamics.jar from JIDT, and then create a config.py in from config.py.dist in smp_base/smp_base. the config has the path to the jar file.

@x75
Copy link
Owner Author

x75 commented Apr 4, 2019

i'll fix along and push

@x75
Copy link
Owner Author

x75 commented Apr 4, 2019

the smp_base/README should have some install info. if not, it needs to be fixed as well :)

@NevilleKitala
Copy link

OK. Please let me know!

@x75
Copy link
Owner Author

x75 commented Apr 5, 2019

it's actually a different issue, so i split that to #2

git pull in smp_base and see the README, it was missing a section for installing rlspy, jpype and jidt.

it's a hassle but is necessary to have installed for utilizing actual smp_sphero model code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants