|
Post by jacapec on Mar 4, 2018 21:49:14 GMT 1
Hi everyone!
My name is Javier and I am a student taking my first steps with Panthera for my dissertation project. First of all, thanks to Cruden for the release of Panthera Free. As a student, this gives me the chance to test virtually the changes in the model.
I would like to run the Simulink model in one computer and run Panthera in the other one, in real time, using ethernet connection (different IP address) for the Formula Student model. At the moment, I have been trying with the "ephysenet.ini" file (Cruden\Panthera\data\cars\formula_student\ephyse_net\v3) in which you can change the IP address for different functions (telemetry, session manager...), opening the Simulink model in one computer (and running it) and opening Panthera in the other computer (so "Waiting for the ePhyseNet model to start" message was showed).
Unfortunately, I was not able to do it. So I wonder if any other steps are required or there is something important that I am missing.
Thanks in advance, Javier
|
|
jvd
New Member
Posts: 22
|
Post by jvd on Mar 5, 2018 15:27:19 GMT 1
Hi Javier,
Quick answer, I think it works if you follow these steps:
- Change the ip address in ephysenet.ini in the section communication_racer.ip_write (this needs to be the ip address of the panthera pc)
- Change the remote folder in ephysenet.ini in the section racer.remote_dir to \\192.168.youiphere\Cruden\Panthera (this needs to be the ip address of the simulink pc)
- Change the ip address in the root folder in racer.ini in the section ephyse_net (this needs to be the ip address of the simulink pc)
Let me know if it works! Jelle
|
|
|
Post by jacapec on Mar 6, 2018 15:02:39 GMT 1
Hi Javier, Quick answer, I think it works if you follow these steps: - Change the ip address in ephysenet.ini in the section communication_racer.ip_write (this needs to be the ip address of the panthera pc) - Change the remote folder in ephysenet.ini in the section racer.remote_dir to \\192.168.youiphere\Cruden\Panthera (this needs to be the ip address of the simulink pc) - Change the ip address in the root folder in racer.ini in the section ephyse_net (this needs to be the ip address of the simulink pc) Let me know if it works! Jelle Hello Jelle, First of all, thank you so much for your quick reply. I have followed that steps but currently I am not able to have any success. At the second step, when modifying remote_dir for ; Where is Racer located I have tried also adding "C:" as follows: remote_dir=192.168.xxx.xx.xxx.xx\C:\Cruden\Panthera" (but I have also tried following the address that you wrote). I have pasted the two modified files (ephysenet.ini and racer.ini) to the Cruden folder at both computers to check if it could be a difference. Of course my two installation folders are located at disk C (C:\Cruden\...). I am going to keep trying, I will write any possible improvement. Thank you again, Javier
|
|
jvd
New Member
Posts: 22
|
Post by jvd on Mar 6, 2018 17:27:51 GMT 1
Yes, it is definitely advised to keep the software load the same on both computers. You should not add C: in the remote folder. Is there a firewall running on any of the computers, that might be blocking the communication? In the bin folder there are two nice tools named "udpsend.exe" and "udpterm.exe". You could use these to see if the communication between the two computers at the selected ports is allowed.
|
|
|
Post by jacapec on Mar 8, 2018 14:38:59 GMT 1
Yes, it is definitely advised to keep the software load the same on both computers. You should not add C: in the remote folder. Is there a firewall running on any of the computers, that might be blocking the communication? In the bin folder there are two nice tools named "udpsend.exe" and "udpterm.exe". You could use these to see if the communication between the two computers at the selected ports is allowed. Thanks for your support Jelle. I am still stuck without any success. The new steps that I followed (and hopefully it could be useful for other users that are trying to do the same task): Preparation:
-I have checked that my Ethernet connection is good and my sharing options are correctly set up: both computers are able to open and write files (I gave full control between both computers). -I have turned off Windows Firewall at the two computers, and disabled the antivirus software too. -Of course, both modified files (ephysenet.ini and racer.ini) are exactly the same at both computers. -Thanks to "udpterm.exe", I realized that my UDP ports are "7000" for both computers (the same number). So I have changed communication_racer.port_write=7000 and communication_racer.port_read=7000 (at ephysenet.ini). Note that I have only changed at this lines of the script. Should I do it at any other required point? I have checked that at racer.ini the ephyse_net.port_output and ephyse_net.port_output are commented (using ; before the line) so I did not changed it. Before running:
-I "Add to Path" the Cruden folder (at Simulink PC) each time before running. -Then I open Panthera and click on "Start Panthera Free" (at Panthera PC) so the launcher is opened and "Waiting for the ePhyseNet model to start" and other messages are shown. Running:
-After opening CrudenSimulinkVehicleModel.mdl (at Simulink PC), and when I try to run the model, I received randomly three different Fatal error messages (different message at each trial, without any modification in the files or in the process): [-/8288] Can't open log file (C:/QLOG.txt) [-/1164] Can't open log file (C:/QLOG.txt) Couldn't find ephysenet.ini directory 'C:\Cruden' or in a parent directory -Then Matlab closes without any other option.
Right now I am trying to create different files (ephysenet.ini and racer.ini) in which I do slightly changes and try to run them.
Thank you again Jelle, Javier
|
|
jvd
New Member
Posts: 22
|
Post by jvd on Mar 8, 2018 16:01:13 GMT 1
Hi Javier,
Please make sure that:
- The folder you add to the Matlab path is "\Cruden\ePhyseNet\blocks_x86" or "\Cruden\ePhyseNet\blocks_x64" (depending on 32 or 64 bits Matlab) - The current folder in Matlab is the folder where the car model is
I think that the problem is that your Matlab model can not find the ephysenet.ini file and therefor does not know what ip address to communicate to.
|
|
|
Post by jacapec on Mar 9, 2018 15:02:08 GMT 1
Hi Javier, Please make sure that: - The folder you add to the Matlab path is "\Cruden\ePhyseNet\blocks_x86" or "\Cruden\ePhyseNet\blocks_x64" (depending on 32 or 64 bits Matlab) - The current folder in Matlab is the folder where the car model is I think that the problem is that your Matlab model can not find the ephysenet.ini file and therefor does not know what ip address to communicate to. Jelle, -I always add to path the entire folder of Cruden. Should I add only specific folder locations? such as blocks_x64 (as you said), v3 folder... From your comment, I understand that it could be a mistake if I add blocks_x86 and blocks_x64 to the path (and it is what I am doing automatically when I add the entire folder). -I was trying to connect both computers using only one ethernet cable. Right now, I am going to try with a router to check if it could be some kind of problems regarding the communication of the two computers (using only one ethernet cable). Thank you again for your amazing help. Javier
|
|
jvd
New Member
Posts: 22
|
Post by jvd on Mar 12, 2018 18:26:05 GMT 1
Hi Javier,
Please try the following:
- Open a Command prompt in Windows - type "ping <youriphere>" - Do you get a reply from the other machine? - If yes, the communication should be fine - If no, please check cables, ip addresses, subnet mask until you get a reply
Can you post what your current ip address settings, etc. are in ephysenet.ini, racer.ini etc?
Can you post a QLOG.txt of the Cruden root folder and the Matlab model folder here?
|
|
|
Post by jacapec on Mar 22, 2018 19:47:25 GMT 1
Hi Javier, Please try the following: - Open a Command prompt in Windows - type "ping <youriphere>" - Do you get a reply from the other machine? - If yes, the communication should be fine - If no, please check cables, ip addresses, subnet mask until you get a reply Can you post what your current ip address settings, etc. are in ephysenet.ini, racer.ini etc? Can you post a QLOG.txt of the Cruden root folder and the Matlab model folder here? Hello again Jelle, I can confirm that both computers are connected correctly (I am using a local network (router)) and ping command works well (I have tried at both computers successfully). I have attached my ephysenet.ini and racer.ini files to this message (of course I remove "_V13 and _V3" from the file name when I pasted them to "v3" and "Panthera" folders so the final names are ephysenet.ini and racer.ini respectively). Furthermore, at Backup info.txt (also attached) all the changes done at the files are written (following the steps that you told me). Unluckily I can not post my "QLOG.txt" files because I am having problems before Simulink (or Panthera) creates them (when I try to run the Simulink model, the "Can't open log file (C:/QLOG.txt)" message appears and Matlab automatically closes. Just to note: -The Cruden folder that I add to the matlab path are located at Panthera PC (remotely). -Before running the model, I have tried to run "m_install.m" and select the Cruden/Panthera folder that is located at Panthera PC (remotely). -I have tried to open the Simulink model (CrudenSimulinkVehicleModel) that is located at Panthera PC (remotely) and run it. -I have removed the "blocks_x86" folder from Matlab path (to avoid possible mistakes or confusion with "blocks_x64" folder). I have tried all of the above but without success. So my question is: Is it right that I have to work with the Panthera files that are located at Panthera PC? (I mean, if I don't have Panthera installed at the Simulink PC, this would not a be problem, right?) Thank you so much Jelle for your attention. Javier
|
|
|
Post by jacapec on Mar 22, 2018 21:26:23 GMT 1
Hi Javier, Please try the following: - Open a Command prompt in Windows - type "ping <youriphere>" - Do you get a reply from the other machine? - If yes, the communication should be fine - If no, please check cables, ip addresses, subnet mask until you get a reply Can you post what your current ip address settings, etc. are in ephysenet.ini, racer.ini etc? Can you post a QLOG.txt of the Cruden root folder and the Matlab model folder here? Hello again Jelle, I can confirm that both computers are connected correctly (I am using a local network (router)) and ping command works well (I have tried at both computers successfully). I have attached my ephysenet.ini and racer.ini files to this message (of course I remove "_V13 and _V3" from the file name when I pasted them to "v3" and "Panthera" folders so the final names are ephysenet.ini and racer.ini respectively). Furthermore, at Backup info.txt (also attached) all the changes done at the files are written (following the steps that you told me). Unluckily I can not post my "QLOG.txt" files because I am having problems before Simulink (or Panthera) creates them (when I try to run the Simulink model, the "Can't open log file (C:/QLOG.txt)" message appears and Matlab automatically closes. Just to note: -The Cruden folder that I add to the matlab path are located at Panthera PC (remotely). -Before running the model, I have tried to run "m_install.m" and select the Cruden/Panthera folder that is located at Panthera PC (remotely). -I have tried to open the Simulink model (CrudenSimulinkVehicleModel) that is located at Panthera PC (remotely) and run it. -I have removed the "blocks_x86" folder from Matlab path (to avoid possible mistakes or confusion with "blocks_x64" folder). I have tried all of the above but without success. So my question is: Is it right that I have to work with the Panthera files that are located at Panthera PC? (I mean, if I don't have Panthera installed at the Simulink PC, this would not a be problem, right?) Thank you so much Jelle for your attention. Javier Jelle, it seems that I have some progress. The message that appeared when trying to run the Simulink model was"Can't open log file (\\192.168.0.20\...", and the message "Can't open log file (C:/QLOG.txt)" (related with the local disk) appeared before when I was trying to run the files that were located at the Panthera local folder of Simulink PC. In order to avoid possible future mistakes, I have uninstalled Panthera at Simulink PC. - 1. After several trials (and trying to run Simulink model with Panthera running or not at the Panthera computer), I have noticed that one QLOG file has been created. Right now the message that appears when running Simulink model is "Couldn't find ephysenet.ini in directory \\192.168.0.20\c\Cruden or in a parent directory". But this file is correctly located at the ephyse_net\v3 folder.
- 2. Anyway, having a look at the QLOG.txt (located at \\192.168.0.20\c\Cruden and attached to this message as QLOG_V1.txt) it seems that Panthera is looking for the ephysenet.ini file at '//192.168.0.20/c/ephysenet.ini', so I have pasted this required file at that required folder.
Doing this step, no error message is created at Matlab related with Panthera. However, Matlab closes due to an internal problem. Now, QLOG files are created at Cruden folder and at Panthera folder too (attached as QLOGV2.1 and QLOGV2.2 respectively). - 3. Trying again but this time with Panthera opened and looking for ephysenet model (at Panthera computer), exactly the same happens (internal problem at Matlab).
Important: \\192.168.0.20\... corresponds to the computer that Panthera is installed. As it can be extracted from QLOG file (V2.1 at line 16), and similar (not exactly because required addresses are different) to that I have done at point 2, I have pasted config.ini at \\192.168.0.20\c\Cruden. But again the same problem with Matlab. At the details (of the error) it is written "This error was detected while a MEX-file was running. If the MEX-file is not an official MathWorks function, please examine its source code for errors...".
The QLOG files extracted from this trial are attached as QLOG_V3.1 and QLOG_V3.2. Notice that I have deleted the QLOG files before each trial so there is not information mixed inside the files. Another question is: Do I have to change host and port names at config.ini file? Right now I am using the default file. Thank you Jelle for your help. Attachments:QLOG files.zip (17.98 KB)
|
|
jvd
New Member
Posts: 22
|
Post by jvd on Mar 23, 2018 14:57:51 GMT 1
Hi Javier,
Don't copy the ephysenet.ini or global/config.ini to other folders. I think your settings should be:
192.168.0.10 SIMULINK 192.168.0.20 PANTHERA
local_dir=../../../../.. remote_dir=\\192.168.0.20\Cruden\Panthera ip_write= 192.168.0.20
So both the ip_write and the remote_dir should point to the computer where Panthera is running (your remote dir is now not set correct). Your current directory in Matlab should be the folder where the CrudenSimulinkVehicleModel is located and the blocks64 folder has to be added to the path.
And yes, I advise you to set the ip addresses in the global/config.ini to the correct machines as well. Hope this helps,
Have a nice weekend,
|
|
|
Post by jacapec on Mar 26, 2018 0:11:32 GMT 1
Hi Javier, Don't copy the ephysenet.ini or global/config.ini to other folders. I think your settings should be: 192.168.0.10 SIMULINK 192.168.0.20 PANTHERA local_dir=../../../../.. remote_dir=\\192.168.0.20\Cruden\Panthera ip_write= 192.168.0.20 So both the ip_write and the remote_dir should point to the computer where Panthera is running (your remote dir is now not set correct). Your current directory in Matlab should be the folder where the CrudenSimulinkVehicleModel is located and the blocks64 folder has to be added to the path. And yes, I advise you to set the ip addresses in the global/config.ini to the correct machines as well. Hope this helps, Have a nice weekend, Thank you Jelle again, Definitely my config files were not correctly set. Nevertheless I have tried the last changes suggested without any success. My idea now is to try something different: instead of keep focusing on Simulink PC, I was thinking to focus on the Panthera PC. Reasons: I have found some problems when trying to run locally (using only one computer) Panthera following the next steps: 1. Click on Start Panthera Free with the "Automatically start external physics model" unticked. 2. Start Simulink and Run the CrudenSimulinkVehicleModel.mdl model. 3. Matlab crashes showing the message "Couldn't find ephysenet.ini in directory...or in a parent directory". As said before, this was the same problem that I had when trying to run Simulink-Panthera using two computers. So right now I am wondering if at any point, it is written where the matlab.exe file is located at any of the Panthera-related scripts. My idea is to change this address (in the Panthera files) and set the remote address of the Simulink PC, so the option "Automatically start external physics model" can be ticked. At the moment I have created a new environment variable related with Matlab (at the Panthera PC) that points to the other PC, remotely (where Matlab is installed) but I was not able to find where the matlab.exe address is written at the Panthera files (using the matlab find tool). Thanks again for the help and the constant support. Javier
|
|
jvd
New Member
Posts: 22
|
Post by jvd on Mar 26, 2018 9:56:19 GMT 1
Hi Javier,
If your "current directory" in Matlab is set to the directory "C:\Cruden\Panthera\data\cars\formula_student\ephyse_net\v0" and the ephysenet.ini is in that folder, then there should be absolutely no reason for you to get that error. You can view what is happening when the "Automatically external physics model" box is ticked in the file "session_manager_lite.lua". Matlab is started and the script modelstart.m is executed. This script only opens and runs the correct CrudenSimulinkVehicleModel.mdl.
Best regards,
|
|
wendy
New Member
Posts: 1
|
Post by wendy on Oct 7, 2018 16:37:38 GMT 1
Hi,
I'm using the matlab 2018a and try to run the Panthera_free and got the following error when I run the CrudenSimulinkVehicleModel model from simulink:
This model contains Simscape Driveline First Generation blocks, which are no longer supported.
any idea?
Thanks advance
|
|
ioh
New Member
Cruden Employee
Posts: 8
|
Post by ioh on Oct 8, 2018 14:10:02 GMT 1
Hello Wendy,
This is true, we use Simscape Gen1 to model multibody dynamics of the vehicle and we use Simscape Driveline (SimDriveline) First Generation to model the powertrain.
Unfortunately, Simscape first Gen is no longer supported by Mathworks as of MATLAB R2017b. Therefore I would recommend you try and run the simulation using an earlier version of MATLAB (e.g. R2015b).
I would be more than happy to answer any other questions you might have!
Kind Regards
Omar Hassanain Cruden
|
|