For some reason, MATLAB splits the name after month and that's why it shows that this function is This is fantastic work! I don'y know how it runs on your machine. I think the problem is in the protofile name as I don't think backslash is allowed Since I call the script from MATLAB, test_mode is set to true. I ran into the second section getting the version of WEBOTS and changing MATLAB working directory to webots matlab controller library.I started to run launcher with breakpoints to get the variables retrieved from the environment.Note that MATLAB is under "Polyspace" not "MATLAB" Before running it, I checked path and environment variables needed.When nothing is happening, I went to launcher.m to test it from MATLAB.I named MATLAB controller * EPuckGoForward * and copied the MATLAB script. I followed the tutorials using Pyhton with no issues and MATLAB.I will walk you through what I did so maybe a hidden bug is there in the release. I guess it is from matlab and webots version but have no idea how it is turned into a function so MATLAB could recognize it I don't know the mechanism for naming this function. However, MATLAB returned that this is an unrecognized function. I figured out that naming has an issue since I use Night build having dates in version number with '/' So I believe the launcher stucks at loading libraries. I couldn't find where this function is created, but I believe it is a naming error as it started with number, not character. I modified a single path to MATLAB library, the only problem left is when loading libraries, I get this error: I opened launcher.m and tried to execute it to check if it works. I even made a new world to test it based on first tutorials: I also verified that MinGW-w64 Compiler is installed and working I rechecked that MATLAB can run using matlab command from CMD window:Įnvironment variables is configured correctly I thought It's probably the problem with loadlibrary Loadlibrary(libname,protofile,'alias','libController') Using prototype file: C:\Users\xsun\AppData\Local\Temp\protofile_matlab_2017b_webots_R2020a_rev2.m The MATLAB "MinGW-w64 C/C Compiler" addon is not installed, please install it from: When I change controller to ,and run launcher.m in Matlab 2017b ,the error msg displayed: After I modified it, there were other errors. I have found some faults in launcher.m and allincludes.h, then I modified : the webots made a mistake in the controller directory of MATLAB (it is not Webots\lib\matlab ,it is Webots\lib\controller\matlab). Or use undistorted image from webots camera (using spherical=false), which is unrealistic if we trying to model a real-life robot with wideangle lenses.#681 problem is that as soon as I start the simulation, matlab will be black and stuck。 To take this into account, we need to implement custom distortion model, which is possible but very undesirable. Note that the distortion modeling coefficients k1, k2, … are same for both X and Y image axes.īut webots simulated image looks like we need to do correction on Y image axis, but we don’t need to do the correction on X axis. Where r is the distance of the current pixel from the center of an image (i.e. Ydistorted = Yideal (1 k1 r k2r^2 …) Xdistorted = Xideal (1 k1 r k2r^2 …) With proper radial distortion I expect something like this:Īs the reminder, classic radial distortion model has a form of: It looks like an image captured from camera with cylindrical imaging surface, not spherical. This is not an image which we can model with radial distortion. But currently from webots camera with “spherical=true” I will get this: Using this, I expect the camera model to be well calibrated as an real-world fisheye/wideangle lenses (i.e. In robot’s PROTO we can set “spherical” property to TRUE. So, which virtual camera model should we use in webots to properly emulate wide-angle lenses on robot’s camera? This is a forwarding of my question on V-HL 2021 discord channel
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |