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

Cannot find bufffer.c #1

Open
alphaville opened this issue Oct 2, 2018 · 2 comments
Open

Cannot find bufffer.c #1

alphaville opened this issue Oct 2, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@alphaville
Copy link
Member

I have added to my MATLAB path the folder src in nmpc-codegen-matlab. I then cd to nmpc-codegen-matlab and run the demo script TwoCircTrailer which gives me the following error

Error using copyfile
cp: cannot stat ‘/home/chung/Documents/NMPCCodegen/old_code/PANOC/buffer.c’: No such file or directory

Error in nmpccodegen.tools.Bootstrapper/copy_over_file (line 148)
                copyfile(src_location, dst_location, 'f');

Error in nmpccodegen.tools.Bootstrapper/generate_PANOC_lib (line 69)
                nmpccodegen.tools.Bootstrapper.copy_over_file(src_location,dst_location,overwrite);

Error in nmpccodegen.tools.Bootstrapper.bootstrap (line 23)
            nmpccodegen.tools.Bootstrapper.generate_PANOC_lib(output_location_controller,location_nmpc_repo,overwrite)

Error in prepare_demo_trailer (line 8)
    nmpccodegen.tools.Bootstrapper.bootstrap(trailer_controller_output_location, true);

Error in TwoCircTrailer (line 16)
trailer_controller = prepare_demo_trailer(controller_folder_name,step_size,Q,R,Q_terminal,R_terminal);

I see that the third line in this file is

addpath(genpath('../../src_matlab'));

The use of relative paths is not very reliable. I guess I need to add nmpc-codegen/old_code/src_matlab to the path. I did that manually, but this didn't solve the issue.

I see, however, that it looks for buffer.c at /home/chung/Documents/NMPCCodegen/old_code/PANOC/buffer.c, while the correct path should be /home/chung/Documents/NMPCCodegen/PANOC/buffer.c.

@alphaville alphaville added the bug Something isn't working label Oct 2, 2018
@alphaville
Copy link
Member Author

Sloppy solution: I changed line 44 in Bootstrap.m to location_repo = [Folder '/..'] ; and it works.

It gives me a different error now, but I'll report it in another issue.

@MelisWillem
Copy link

yea your right, i used relative path here for ease of use for the user, maybe i should use the one already in the path and display an error to the user that he should add the lib to the path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants