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

Write ATPtg/ATMCS integration test script

    XMLWordPrintable

    Details

      Description

      Write an integration test for ATPtg to ATMCS as a SAL script and add it to ts_standardscripts.

      There may be some overhead because this is the first script added to that package.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment - - edited

            Tiago Ribeiro's tiagorib/ptkernel:new_xml Docker container contains a version of ATPtg whose topics are compatible with ts_xml develop, and thus can communication with the ATMCS Simulator. This unblocks a problem I was having.

            The next release of ATPtg will have several important improvements, two of which are directly relevant to this ticket:

            • Eliminate the use of the pointingDirection field in the ATMCS trackTarget command. Because of this, I must immediately implement DM-18154, so the pointing vendor has it available.
            • Add a command to stop tracking. The integration test will use this command, which will make the code much nicer.
            Show
            rowen Russell Owen added a comment - - edited Tiago Ribeiro 's tiagorib/ptkernel:new_xml Docker container contains a version of ATPtg whose topics are compatible with ts_xml develop, and thus can communication with the ATMCS Simulator. This unblocks a problem I was having. The next release of ATPtg will have several important improvements, two of which are directly relevant to this ticket: Eliminate the use of the pointingDirection field in the ATMCS trackTarget command. Because of this, I must immediately implement DM-18154 , so the pointing vendor has it available. Add a command to stop tracking. The integration test will use this command, which will make the code much nicer.
            Hide
            rowen Russell Owen added a comment - - edited

            This showed a few issues in the ATMCS simulator, so I updated ts_ATMCSSimulator on tickets/DM-18154, since that is where I've been tracking some changes for tiagorib/ptkernel:new_xml.

            ts_standardscripts pull request: https://github.com/lsst-ts/ts_standardscripts/pull/4

            Show
            rowen Russell Owen added a comment - - edited This showed a few issues in the ATMCS simulator, so I updated ts_ATMCSSimulator on tickets/ DM-18154 , since that is where I've been tracking some changes for tiagorib/ptkernel:new_xml. ts_standardscripts pull request: https://github.com/lsst-ts/ts_standardscripts/pull/4
            Hide
            tribeiro Tiago Ribeiro added a comment -

            This test is driven by this script script in the ts_standardscripts repository. I review the script code and it looks good.

            I also took the time to run the script. For that I did:

            1. Start docker container tiagorib/ptkernel:new_xml (runs ATPtg)
            2. Start a lsst/queue container, install ts_ATMCSSimulator: https://github.com/lsst-ts/ts_ATMCSSimulator.git branch tickets/DM-18154
            3. Start a lsst/queue container, build topics for ATMCS, clone and setup ts_standardscripts
            4. Start a lsst/queue container and run request_script.py.

            from container 4, run run s auxtel/integration_tests/atptg_atmcs_integration.py --moni

            Then I get the output

            [DEBUG]:No configuration file or in line parameters.
            [DEBUG]:Adding auxtel/integration_tests/atptg_atmcs_integration.py to the queue.
            [INFO]:Monitoring execution of script 100005.
            [DEBUG]:Starting script remote
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.UNCONFIGURED][ScriptProcessState.LOADING]
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.UNCONFIGURED][ScriptProcessState.CONFIGURED]
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.CONFIGURED][ScriptProcessState.RUNNING]
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.RUNNING][ScriptProcessState.RUNNING]
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.ENDING][ScriptProcessState.RUNNING]
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.DONE][ScriptProcessState.RUNNING]
            [DEBUG]:[100005]:INIT DONE
            [DEBUG]:[100005]:Configuring....
            [DEBUG]:[100005]:30:0:1:True:True
            [DEBUG]:[100005]:Configure done....
            [DEBUG]:[100005]:RUNNING....
            [INFO]:[100005]:Enable ATMCS
            [INFO]:[100005]:Enable ATPtg
            [INFO]:[100005]:telescope initial el=7.404387392174783, az=-0.06679492717406005
            [INFO]:[100005]:Time error=-20.90 sec
            [INFO]:[100005]:raDecTarget ra='5.60465' hour; declination='29.745' deg
            [INFO]:[100005]:raDecTarget command result: Done : OK
            [INFO]:[100005]:target event time=1552086960.85; current tai unix =1552086923.82; diff=37.03 sec
            [INFO]:[100005]:desired el=30.00, az=0.00; target el=30.02, az=359.91 deg
            [INFO]:[100005]:target velocity el=-0.0000, az=-0.0042
            [INFO]:[100005]:el/az separation=491.84514880254227 arcsec; max=1.0 deg
            [INFO]:[100005]:cleanup
            [INFO]:[100005]:Disabled ATPtg
            [ERROR]:[100005]:cleanup: ATMCS stopTracking failed with msg='Command failed with ack code -301', cmd_id=1552086899, ack=(ack=-301, error=0, result='')
            [INFO]:[100005]:Setting final state to <ScriptState.DONE: 8>
            [DEBUG]:[100005]:[checkpoint]
            [DEBUG]:[100005]:[checkpoint]
            [DEBUG]:[100005]:[checkpoint]
            [DEBUG]:[100005]:[checkpoint]enable_cscs
            [DEBUG]:[100005]:[checkpoint]start_tracking
            [DEBUG]:[100005]:[checkpoint]start_tracking
            [DEBUG]:[100005]:[checkpoint]start_tracking
            [DEBUG]:[100005]:[heartbeat:1] - [total lost:0]
            [DEBUG]:[100005]:[heartbeat:2] - [total lost:0]
            [DEBUG]:[100005]:[heartbeat:3] - [total lost:0]
            [DEBUG]:[100005]:[heartbeat:4] - [total lost:0]
            [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:36.44][ScriptState.DONE][ScriptProcessState.DONE]
            

            As it is possible to see, the last line indicate that the script ran successfully.

            Show
            tribeiro Tiago Ribeiro added a comment - This test is driven by this script script in the ts_standardscripts repository. I review the script code and it looks good. I also took the time to run the script. For that I did: Start docker container tiagorib/ptkernel:new_xml (runs ATPtg) Start a lsst/queue container, install ts_ATMCSSimulator: https://github.com/lsst-ts/ts_ATMCSSimulator.git branch tickets/ DM-18154 Start a lsst/queue container, build topics for ATMCS, clone and setup ts_standardscripts Start a lsst/queue container and run request_script.py . from container 4, run run s auxtel/integration_tests/atptg_atmcs_integration.py --moni Then I get the output [DEBUG]:No configuration file or in line parameters. [DEBUG]:Adding auxtel/integration_tests/atptg_atmcs_integration.py to the queue. [INFO]:Monitoring execution of script 100005. [DEBUG]:Starting script remote [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.UNCONFIGURED][ScriptProcessState.LOADING] [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.UNCONFIGURED][ScriptProcessState.CONFIGURED] [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.CONFIGURED][ScriptProcessState.RUNNING] [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.RUNNING][ScriptProcessState.RUNNING] [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.ENDING][ScriptProcessState.RUNNING] [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:0.0][ScriptState.DONE][ScriptProcessState.RUNNING] [DEBUG]:[100005]:INIT DONE [DEBUG]:[100005]:Configuring.... [DEBUG]:[100005]:30:0:1:True:True [DEBUG]:[100005]:Configure done.... [DEBUG]:[100005]:RUNNING.... [INFO]:[100005]:Enable ATMCS [INFO]:[100005]:Enable ATPtg [INFO]:[100005]:telescope initial el=7.404387392174783, az=-0.06679492717406005 [INFO]:[100005]:Time error=-20.90 sec [INFO]:[100005]:raDecTarget ra='5.60465' hour; declination='29.745' deg [INFO]:[100005]:raDecTarget command result: Done : OK [INFO]:[100005]:target event time=1552086960.85; current tai unix =1552086923.82; diff=37.03 sec [INFO]:[100005]:desired el=30.00, az=0.00; target el=30.02, az=359.91 deg [INFO]:[100005]:target velocity el=-0.0000, az=-0.0042 [INFO]:[100005]:el/az separation=491.84514880254227 arcsec; max=1.0 deg [INFO]:[100005]:cleanup [INFO]:[100005]:Disabled ATPtg [ERROR]:[100005]:cleanup: ATMCS stopTracking failed with msg='Command failed with ack code -301', cmd_id=1552086899, ack=(ack=-301, error=0, result='') [INFO]:[100005]:Setting final state to <ScriptState.DONE: 8> [DEBUG]:[100005]:[checkpoint] [DEBUG]:[100005]:[checkpoint] [DEBUG]:[100005]:[checkpoint] [DEBUG]:[100005]:[checkpoint]enable_cscs [DEBUG]:[100005]:[checkpoint]start_tracking [DEBUG]:[100005]:[checkpoint]start_tracking [DEBUG]:[100005]:[checkpoint]start_tracking [DEBUG]:[100005]:[heartbeat:1] - [total lost:0] [DEBUG]:[100005]:[heartbeat:2] - [total lost:0] [DEBUG]:[100005]:[heartbeat:3] - [total lost:0] [DEBUG]:[100005]:[heartbeat:4] - [total lost:0] [salIndex:100005][Standard][path:auxtel/integration_tests/atptg_atmcs_integration.py][duration:36.44][ScriptState.DONE][ScriptProcessState.DONE] As it is possible to see, the last line indicate that the script ran successfully.
            Hide
            rowen Russell Owen added a comment -

            Merged to develop (we still have no master branch and I'm not sure when we want to make our first release).

            Show
            rowen Russell Owen added a comment - Merged to develop (we still have no master branch and I'm not sure when we want to make our first release).

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Tiago Ribeiro
              Watchers:
              Russell Owen, Tiago Ribeiro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

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

                  Jenkins

                  No builds found.