Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-29947

Review the Latest Trajectory Documents of TMA

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ts_main_telescope
    • Labels:

      Description

      Review the latest trajectory documents of TMA:
      1. TrajectoriesDoc-04292021.docx
      2. CodeGeneration-04292021.docx

        Attachments

          Issue Links

            Activity

            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            I checked the updated TrajectoriesDoc-04292021.docx did fix the problems I had in the previous time.

            For the CodeGeneration-04292021.docx, the main update is the Appendix (section 4). The following features are interesting:
            1. convertToSinglePrecission
            2. TargetLangStandard
            3. TargetLang
            4. fcns_for_argtypes
            5. argTypes

            It looks like the GenerateCode() is a high-level function to use the MATLAB original codegen:
            https://www.mathworks.com/help/coder/ref/codegen.html

            Show
            ttsai Te-Wei Tsai added a comment - - edited I checked the updated  TrajectoriesDoc-04292021.docx did fix the problems I had in the previous time. For the CodeGeneration-04292021.docx , the main update is the Appendix (section 4). The following features are interesting: 1. convertToSinglePrecission 2. TargetLangStandard 3. TargetLang 4. fcns_for_argtypes 5. argTypes It looks like the  GenerateCode()  is a high-level function to use the MATLAB original codegen: https://www.mathworks.com/help/coder/ref/codegen.html
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            I tried to execute the init() followed by codeGenerationScript() with some modification in codeGenerationScript.m:

            % opts.requiredmatlabrelease = '2019b';
            opts.requiredmatlabrelease = '2019a';
             
            % opts.codegengitfolder = '../trajectoriesGeneratedCode';
            opts.codegengitfolder = 'trajectoriesGeneratedCode';
             
            % opts.gitorigin_url = 'git@gitlab.tekniker.es:aut/projects/3151-LSST/trajectories/generatedcppcode.git';
            

            I used the 2019a instead because I have other project is using this one. In addition, I do not think the version of MATLAB does matter here for the code generation (2019a and 2019b do not differ much).

            I have the following error:

            Error using Lib.CompilerAndCodegen.GetPathsAndGitHashes
            Kodigoaren trazabilidadea ziurtatu ahal izateko beharrezkoa da kodigoa sortzerako
            orduan karpetan aldaketarik ez egotea: egin commit zai dauden aldaketei eta saiatu
            berriro
             
            Error in Lib.CompilerAndCodegen.GenerateCode
             
            Error in codeGenerationScript (line 15)
            Lib.CompilerAndCodegen.GenerateCode(opts);
            

            No idea where is the problem.

            In addition, the error message is not in English but in basque.

            Show
            ttsai Te-Wei Tsai added a comment - - edited I tried to execute the init() followed by codeGenerationScript() with some modification in codeGenerationScript.m : % opts.requiredmatlabrelease = '2019b'; opts.requiredmatlabrelease = '2019a';   % opts.codegengitfolder = '../trajectoriesGeneratedCode'; opts.codegengitfolder = 'trajectoriesGeneratedCode';   % opts.gitorigin_url = 'git@gitlab.tekniker.es:aut/projects/3151-LSST/trajectories/generatedcppcode.git'; I used the 2019a instead because I have other project is using this one. In addition, I do not think the version of MATLAB does matter here for the code generation (2019a and 2019b do not differ much). I have the following error: Error using Lib.CompilerAndCodegen.GetPathsAndGitHashes Kodigoaren trazabilidadea ziurtatu ahal izateko beharrezkoa da kodigoa sortzerako orduan karpetan aldaketarik ez egotea: egin commit zai dauden aldaketei eta saiatu berriro   Error in Lib.CompilerAndCodegen.GenerateCode   Error in codeGenerationScript (line 15) Lib.CompilerAndCodegen.GenerateCode(opts); No idea where is the problem. In addition, the error message is not in English but in basque.
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            I updated the codeGenerationScript.m again:

            % opts.AbortIfGitIsNotClean = true;
            opts.AbortIfGitIsNotClean = false;
            

            Rerun the code generation and get the following error:

            ??? Class 'JerkLimitedTrajectory' does not have a method or property with name
            'reset'.
             
            Error in ==> reset Line: 4 Column: 1
            Code generation failed: View Error Report
            Error using codegen
             
             
            Error in Lib.CompilerAndCodegen.GenerateCode
             
            Error in codeGenerationScript (line 16)
            Lib.CompilerAndCodegen.GenerateCode(opts);
            

            I instantiated an object of JerkLimitedTrajectory and checked the methods:

            // Some comments here
            Methods for class JerkLimitedTrajectory:
             
            JerkLimitedTrajectory  getSetpoint            setStatus              
            fromStruct             getStatus              setStopOnError         
            getFinalConditions     move                   stop                   
            getProfile             setConcatenateMoves    toStruct               
            getSetPoint            setInitialPosition     
             
            Static methods:
             
            getMoveTimes           getStopTimes           
             
            Methods of JerkLimitedTrajectory inherited from handle.
            

            Check the properties:

            Properties for class JerkLimitedTrajectory:
             
                moveLimits
                stopLimits
                x
                v
                a
                J
            
            

            Therefore, there is nothing of "reset". The commit of 2f4d88c in trayectorias is tested.

            Show
            ttsai Te-Wei Tsai added a comment - - edited I updated the  codeGenerationScript.m again: % opts.AbortIfGitIsNotClean = true; opts.AbortIfGitIsNotClean = false; Rerun the code generation and get the following error: ??? Class 'JerkLimitedTrajectory' does not have a method or property with name 'reset'.   Error in ==> reset Line: 4 Column: 1 Code generation failed: View Error Report Error using codegen     Error in Lib.CompilerAndCodegen.GenerateCode   Error in codeGenerationScript (line 16) Lib.CompilerAndCodegen.GenerateCode(opts); I instantiated an object of JerkLimitedTrajectory and checked the methods: // Some comments here Methods for class JerkLimitedTrajectory:   JerkLimitedTrajectory getSetpoint setStatus fromStruct getStatus setStopOnError getFinalConditions move stop getProfile setConcatenateMoves toStruct getSetPoint setInitialPosition   Static methods:   getMoveTimes getStopTimes   Methods of JerkLimitedTrajectory inherited from handle. Check the properties: Properties for class JerkLimitedTrajectory:   moveLimits stopLimits x v a J Therefore, there is nothing of "reset". The commit of 2f4d88c in trayectorias is tested.
            Hide
            ttsai Te-Wei Tsai added a comment -

            Please help to review this ticket. It looks like I could not generate the C/C++ code based on the document of code generation. The details are in the comments of ticket. Thanks!

            Show
            ttsai Te-Wei Tsai added a comment - Please help to review this ticket. It looks like I could not generate the C/C++ code based on the document of code generation. The details are in the comments of ticket. Thanks!
            Hide
            dmills Dave Mills added a comment -

            Ok , I will follow up with Tekniker

            Show
            dmills Dave Mills added a comment - Ok , I will follow up with Tekniker

              People

              Assignee:
              ttsai Te-Wei Tsai
              Reporter:
              ttsai Te-Wei Tsai
              Reviewers:
              Dave Mills
              Watchers:
              Dave Mills, Te-Wei Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Start date:
                End date:

                  Jenkins

                  No builds found.