Closed TFT-Ben closed 3 years ago
Should probably mention I'm running on MATLAB R2020a
Briefly poking this, as revisited the package and still have the issue
I am having similar issue as well. Any solutions to this?
Hi @TFT-Ben,
Sorry for the late response, can you tell me which operating system are you using?
Hi @su101195,
Can you tell me which operating system are you using?
Hi @BrandonEscamilla - I'm on Windows 10
ok, I think the problem is related to the relative path of the kernels. The version of this repo is working for Unix systems, so the path used won't work for you since it's hardcoded. I will work on a feature to use the correct path on both operating systems. In the meantime, you can always change the path directly in your local installation.
Thanks, I'll try and find the paths I need to set up manually. Failing that, I have a Ubuntu dual-boot I can try if it comes to it.
The path you need to change is under /molto_it/molto_it.m, there is a variable called input.spice_dir, there you can set the path to the kernels directly using the relative path of your OS
Hi @BrandonEscamilla I am using Windows 10.
@TFT-Ben @su101195 Can you try to pull the changes I made to MOLTO, and try a clean installation again? I already fixed the paths problem, but I am not able to really test it, since I am not a Windows 10 user
@BrandonEscamilla Cool. Would that mean redownloading the entire code? I am very new to Github. Thanks!
@BrandonEscamilla Running input.problem_name = example; generates an error: Unrecognized function or variable 'example'.
@BrandonEscamilla Cool. Would that mean redownloading the entire code? I am very new to Github. Thanks!
You just need to use the command git fetch and after that the command git pull origin master
@BrandonEscamilla
Running input.problem_name = example; generates an error: Unrecognized function or variable 'example'.
@su101195 You need to run the file Examples.m which already has a mission example to Ceres, under MOLTO-IT/examples
@BrandonEscamilla Thanks! I get the following error when I run Examples.m:
Undefined function or variable 'cspice_str2et'.
Error in fitness_nsga2 (line 79) et0_min = cspice_str2et(setup.t0_min);
Error in evaluate>evalIndividual (line 50) [y, cons] = objfun( indi.var, varargin{:} );
@BrandonEscamilla Thanks! I get the following error when I run Examples.m:
Undefined function or variable 'cspice_str2et'.
Error in fitness_nsga2 (line 79)
et0_min = cspice_str2et(setup.t0_min);
Error in evaluate>evalIndividual (line 50)
[y, cons] = objfun( indi.var, varargin{:} );
@su101195 Did you install spice in your local computer? Check if you have a folder called MOLTO-IT/Spice/mice
@BrandonEscamilla Ah! I do not have that folder. But I am unable to download it either from the NAIF website. The link seems to be broken over there. Thanks!
@BrandonEscamilla Ah! I do not have that folder. But I am unable to download it either from the NAIF website. The link seems to be broken over there. Thanks!
I did have the same problem last time, try to open it using incognito mode, or use right click and click in the incognito option, let me know if that works
@BrandonEscamilla Thanks for the suggestion! Right clicking and opening it in Incognito Mode worked. Will try to run the Examples.m script again now!
@BrandonEscamilla The same error pops up. I have installed the mice folder in the spice folder.
Did you follow up the instructions in the read me file? And added the directory to the MATLAB path?
@BrandonEscamilla Yes I did. The same error as described by @TFT-Ben pops up. Error using mice SPICE(NOLEAPSECONDS): [str2et_c->STR2ET->TTRANS] The variable that points to the leapseconds (DELTET/DELTA_AT) could not be located in the kernel pool. It is likely that the leapseconds kernel has not been loaded via the routine FURNSH.
Error in cspice_str2et (line 164) [et] = mice('str2et_c',str);
@BrandonEscamilla Yes I did. The same error as described by @TFT-Ben pops up.
Error using mice
SPICE(NOLEAPSECONDS): [str2et_c->STR2ET->TTRANS] The variable that points to the leapseconds (DELTET/DELTA_AT) could not be located in
the kernel pool. It is likely that the leapseconds kernel has not been loaded via the routine FURNSH.
Error in cspice_str2et (line 164)
[et] = mice('str2et_c',str);
Ok, @su101195 Can you provide me an screenshot of your spice directory structure? just to check it out, And also it could be useful if you can print the variables: kernels, mice_lib and mice_src, in the file spice/load_spice_kernels.m, and share them here
@BrandonEscamilla Here you go:
When I gave the path to the spice/mice folder I got the following error. So was unable to print the variables you requested:
@su101195 I will check it out. I'll install a Windows Virtual Machine to test MOLTO, I will let you know if I find any issue to correctly setup MOLTO
Hi @su101195 I already try MOLTO-IT in a Windows 10 virtual machine, I had somes issues installing MOLTO but not related to the Kernels, I suggest you to double check your Matlab paths. I will let you the step by step I follow to make it work in Windows 10. It will be very detailed since some others users could find this information useful. I think this week I will update the README file to add this explanation.
Install git from https://git-scm.com/
Open CMD and Go to Documents (or the path you want to use)
Use git clone https://github.com/uc3m-aerospace/MOLTO-IT.git
Enter the cloned directory
Before running the code, SPICE/mice needs to be installed, go here and download mice.zip (if the link is not working use incognito mode), uncompress the folder in your downloads directory and copy the extracted directory called "mice"
Go to Users/youruser/Documents/MOLTO-IT/spice and paste the copied directory ("mice") - your directory structrure now should look like this
At this point, MOLTO-IT should work now, but there are some issues you will find even after the kernels of SPICE are loaded correctly.
First, add the folder and subfolder paths of MOLTO-IT to Matlab, select all the folders within MOLTO-IT and follow the steps: Secondary click -> add path -> selected folders and subfolders
After adding the paths you need to solve an issue related to Windows 10, you need to rename a function called "propagate_spirals_mex" to "propagate_spirals" within the files "MOLTO-IT\molto_it\inner_loop\departure_cons.m" and "MOLTO-IT\molto_it\inner_loop\flyby_cons.m" (this function is called at least 2 times in every file)
After these changes, you can go to the directory Examples using Matlab and run the file Examples.m, it should work now.
If you have any issue please let me know
@BrandonEscamilla It works perfectly! Thanks for all the help. Any idea on how to obtain the DV for maneuver and final velocities? Is it possible to obtain the plots for the example cases as obtained in the research paper that was published? Also, I get the follwoing error when I run the example case for Pluto:
@su101195 when running a mission, you will notice a new directory called tmp, this directory is created to save all the data generated during the genetic algorithm runtime, so once you run a successful mission, there should be another directory with the name of your mission (input.problem_name) which is harcoded in the examples file. (ex. tmp/Ceres), this directory could have four types of files: gen[number].txt, Results_extendend.txt, Accel[number].eps, and Trajectory[number].eps, the latter two .eps files, are plots of the accel vs time, and other for the trajectory. To obtain both files, you need to change the input.plot value to 1 (default is 0), this should be done once you have ran a successful mission, this means you have a Results_extended.txt file within tmp/your_mission_name.
In the case of Pluto, it looks like you are trying to run the mission with the value input.plot as 1, before running the mission with the input.plot as 0, it's related to what I did mention just above. Double check input.plot in Pluto example.
If you have any problem let me know.
@BrandonEscamilla Is it possible to plot the trajectory of the planets for a mission for better visualization? Currently I am getting plots such as below and I don't know what to interpret from this. Its for a Earth-Ceres mission.
Hi @su101195 I already try MOLTO-IT in a Windows 10 virtual machine, I had somes issues installing MOLTO but not related to the Kernels, I suggest you to double check your Matlab paths. I will let you the step by step I follow to make it work in Windows 10. It will be very detailed since some others users could find this information useful. I think this week I will update the README file to add this explanation.
1. Install git from https://git-scm.com/ 2. Open CMD and Go to Documents (or the path you want to use) 3. ![Captura](https://user-images.githubusercontent.com/21966716/115161057-1b95b500-a061-11eb-95a2-dbe48b5bae80.PNG) 4. Use `git clone https://github.com/uc3m-aerospace/MOLTO-IT.git` 5. Enter the cloned directory ![2](https://user-images.githubusercontent.com/21966716/115161125-716a5d00-a061-11eb-9279-9a0f50c167dc.PNG) 6. Before running the code, SPICE/mice needs to be installed, go [here](https://naif.jpl.nasa.gov/naif/toolkit_MATLAB_PC_Windows_VisualC_MATLAB8.x_64bit.html) and download mice.zip (if the link is not working use incognito mode), uncompress the folder in your downloads directory and copy the extracted directory called "mice" 7. Go to Users/youruser/Documents/MOLTO-IT/spice and paste the copied directory ("mice") - your directory structrure now should look like this ![dir](https://user-images.githubusercontent.com/21966716/115161649-885e7e80-a064-11eb-91bc-b454efc05b8c.PNG) 8. At this point, MOLTO-IT should work now, but there are some issues you will find even after the kernels of SPICE are loaded correctly. 9. First, add the folder and subfolder paths of MOLTO-IT to Matlab, select all the folders within MOLTO-IT and follow the steps: Secondary click -> add path -> selected folders and subfolders ![path](https://user-images.githubusercontent.com/21966716/115161679-aa580100-a064-11eb-97aa-3c2fc99ecc94.PNG) 10. After adding the paths you need to solve an issue related to Windows 10, you need to rename a function called "propagate_spirals_mex" to "propagate_spirals" within the files "MOLTO-IT\molto_it\inner_loop\departure_cons.m" and "MOLTO-IT\molto_it\inner_loop\flyby_cons.m" (this function is called at least 2 times in every file) 11. After these changes, you can go to the directory Examples using Matlab and run the file Examples.m, it should work now.
If you have any issue please let me know
Hi Brandon.
I just followed this and now have a well functioning, healthy, running install! Thank you so much for your time, and thanks for writing one of the only toolkits doing this analysis!
Now to play with some configs and work out how to obtain dV estimates...
Cheers!
Just wondering, is there a description of the plot anywhere?
For instance, I assume solid lines are propulsive, dashed are coast - what are the solid and hollow points?
edit: additionally, what is the logic behind which trajectory gets selected for plotting? it is automatically shortest transfer/lowest propellant mass fraction?
Further question - is there a reasonable way to get burn duration out of the results data/acceleration plot?
Cheers
@TFT-Ben The above plot is for an Earth- Jupiter trajectory??
@TFT-Ben The above plot is for an Earth- Jupiter trajectory??
No, Earth-Ceres, I was experimenting with different allowable flybys
@TFT-Ben The above plot is for an Earth- Jupiter trajectory??
No, Earth-Ceres, I was experimenting with different allowable flybys
I see! Were you able to stabilize the plot windows. They seem to disappear as soon as it gets plotted. I have to everytime convert the .eps file to .jpg file to view them.
@TFT-Ben The above plot is for an Earth- Jupiter trajectory??
No, Earth-Ceres, I was experimenting with different allowable flybys
I see! Were you able to stabilize the plot windows. They seem to disappear as soon as it gets plotted. I have to everytime convert the .eps file to .jpg file to view them.
Nope, I just downloaded EPSviewer and open them separately
I did see that Brandon has some very impressive trajectory plots in his dissertation, including the planet trajectories, so maybe it's doable with some poking around
@TFT-Ben The above plot is for an Earth- Jupiter trajectory??
No, Earth-Ceres, I was experimenting with different allowable flybys
I see! Were you able to stabilize the plot windows. They seem to disappear as soon as it gets plotted. I have to everytime convert the .eps file to .jpg file to view them.
Nope, I just downloaded EPSviewer and open them separately
I did see that Brandon has some very impressive trajectory plots in his dissertation, including the planet trajectories, so maybe it's doable with some poking around
Yes! I did see it in the research paper and I had asked him that question but not sure if he has seen this thread.
Yes! I did see it in the research paper and I had asked him that question but not sure if he has seen this thread.
Well this issue has gone a bit off topic now ;)
Yes! I did see it in the research paper and I had asked him that question but not sure if he has seen this thread.
Well this issue has gone a bit off topic now ;)
true that!
Hi @TFT-Ben, @su101195,
I can see that both of you have more questions, and I am very happy you've found MOLTO useful for your use cases. Right now, there are more than 2 or 3 questions in this thread, and it's difficult to follow up on each of them.
It would be awesome if you can collect your last questions without answers and open different issues to them, so we can correctly follow up and close them. 🙏 Besides, I would like to clear out that this dissertation belongs to David Morante @dmoranteg, but during the last 2 years I've been working with him to bring a web interface to MOLTO to make it easier for everyone to play with different missions. That's why I can answer most of the questions, but there are some questions that the correct person to give an answer will be David. I will let him know about all these new open issues so he can also check them out. 😃
I would also like to invite you to contribute to MOLTO if you are in conditions to do so. Pull requests are always welcome as well as new ideas!
I will close this issue for now, and I will be very happy to answer the new individual issues.
Thank you! 🛰️
Just setting up a default install and attempting to run the 'Ceres' example. Command is being run from the MOLTI-IT directory, if that matters.
Two observations: 1) running
input.problem_name = example;
generates an error:Unrecognized function or variable 'example'.
but more pressing, 2) upon configuring the input variable as given in the Ceres example, I get this:
SPICE package has been installed as per instructions. Directory has the MOLTO-IT name, and should be seen by molto_it.m calling
load_spice_kernels(input.spice_dir);
. Input directory is set as default asinput.spice_dir = '~/MOLTO-IT/spice';
and the directories have the correct names. For some reason, these files still aren't being seen. Any ideas?It's been a while since I've seriously used MATLAB, so I apologise if I've missed something obvious.