Skip to content
Snippets Groups Projects
Unverified Commit 97f713ab authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Integration of new SRT LDO derotators into centos_7_compatibility branch (#925)

* Moved some method from GenericDerotator to SRTKBandDerotator

The methods were not generic, they were specific methods of the old SRTKBandDerotator decommissioned interface.
These methods are not even called by the DewarPositioner component, therefore it was safe to remove them from the GenericDerotator interface.

* Moved another unused method

* Updated GenericDerotator interface

* Fix #865, fix #869, updated SRTMinorServo component

The component now handles correctly a SETUP command.
The component is also capable of commanding the gregorian air blade with the 'setGregorianAirBladeStatus' command.
A few bugs were fixed here and there.
This branch MUST be tested with the real hardware before merging it onto the centos_7_compatibility branch.

* Fixed small bug

* Removed redundant script

* Uploading files in order to test a clean repository

* Updated PyDewarPositioner for Python 3

* First LDO Derotators working implementation

This commit also brings some clean up inside the SRT test CDB.
All the stuff that is not used in the production environment has been moved out of the production and test environment and into the Outdated CDB.

* KBand derotator updates

* Moved SRTDerotators out of SRTMinorServoBossCore

Each derotator now has its thread for updating its status
parent e311ab51
No related branches found
No related tags found
No related merge requests found
Showing
with 164 additions and 10 deletions
...@@ -583,7 +583,7 @@ namespace MinorServo ...@@ -583,7 +583,7 @@ namespace MinorServo
const std::string getPlainCommand() const const std::string getPlainCommand() const
{ {
std::shared_lock<std::shared_mutex> lock(m_mutex); std::shared_lock<std::shared_mutex> lock(m_mutex);
return this->get<std::string>("PLAIN_COMMAND"); return this->count("PLAIN_COMMAND") > 0 ? this->get<std::string>("PLAIN_COMMAND") : "";
} }
/** /**
...@@ -593,7 +593,7 @@ namespace MinorServo ...@@ -593,7 +593,7 @@ namespace MinorServo
const std::string getPlainAnswer() const const std::string getPlainAnswer() const
{ {
std::shared_lock<std::shared_mutex> lock(m_mutex); std::shared_lock<std::shared_mutex> lock(m_mutex);
return this->get<std::string>("PLAIN_ANSWER"); return this->count("PLAIN_ANSWER") > 0 ? this->get<std::string>("PLAIN_ANSWER") : "";
} }
protected: protected:
...@@ -883,6 +883,25 @@ namespace MinorServo ...@@ -883,6 +883,25 @@ namespace MinorServo
*/ */
const std::vector<std::string> m_virtual_offsets; const std::vector<std::string> m_virtual_offsets;
}; };
/**
* This class is a specialization of the SRTMinorServoStatus for a derotator of the Leonardo Minor Servo System.
*/
class SRTDerotatorStatus : public SRTMinorServoStatus
{
public:
using SRTMinorServoStatus::SRTMinorServoStatus;
/**
* This method returns the current derotator position. There is a sign inversion since the LDO derotator sign is opposite to the required one.
* @return the current derotator position
*/
double getActualPosition() const
{
double position = getVirtualPositions()[0];
return position == 0 ? position : -position;
}
};
} }
#endif #endif
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<toolAgainstInterfaceRepository></toolAgainstInterfaceRepository> <toolAgainstInterfaceRepository></toolAgainstInterfaceRepository>
<toolAgainstNameService></toolAgainstNameService> <toolAgainstNameService></toolAgainstNameService>
<containers> <containers>
<select>34</select> <select>31</select>
<againstManagerHost></againstManagerHost> <againstManagerHost></againstManagerHost>
<againstManagerPort></againstManagerPort> <againstManagerPort></againstManagerPort>
<againstCDB></againstCDB> <againstCDB></againstCDB>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<remoteHost>MASTERHOST</remoteHost> <remoteHost>MASTERHOST</remoteHost>
<remoteAccount>discos</remoteAccount> <remoteAccount>discos</remoteAccount>
</container> </container>
<container> <!--container>
<name>LocalOscillatorLPContainer</name> <name>LocalOscillatorLPContainer</name>
<type>py</type> <type>py</type>
<heapSizeMB></heapSizeMB> <heapSizeMB></heapSizeMB>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<scriptBase>0</scriptBase> <scriptBase>0</scriptBase>
<remoteHost>MASTERHOST</remoteHost> <remoteHost>MASTERHOST</remoteHost>
<remoteAccount>discos</remoteAccount> <remoteAccount>discos</remoteAccount>
</container> </container-->
<container> <container>
<name>LocalOscillatorCContainer</name> <name>LocalOscillatorCContainer</name>
<type>py</type> <type>py</type>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<remoteHost>MASTERHOST</remoteHost> <remoteHost>MASTERHOST</remoteHost>
<remoteAccount>discos</remoteAccount> <remoteAccount>discos</remoteAccount>
</container> </container>
<container> <!--container>
<name>SRTLPBandContainer</name> <name>SRTLPBandContainer</name>
<type>cpp</type> <type>cpp</type>
<heapSizeMB></heapSizeMB> <heapSizeMB></heapSizeMB>
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<scriptBase>0</scriptBase> <scriptBase>0</scriptBase>
<remoteHost>MASTERHOST</remoteHost> <remoteHost>MASTERHOST</remoteHost>
<remoteAccount>discos</remoteAccount> <remoteAccount>discos</remoteAccount>
</container> </container-->
<container> <container>
<name>TotalPowerContainer</name> <name>TotalPowerContainer</name>
<type>cpp</type> <type>cpp</type>
......
<?xml version="1.0" encoding="utf-8"?>
<Component
xmlns="urn:schemas-cosylab-com:Component:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Name="DR_GFR2"
Code="SRTDerotatorImpl"
ImplLang="cpp"
Type="IDL:alma/MinorServo/SRTDerotator:1.0"
Container="MinorServoContainer"
Default="false"
/>
<?xml version="1.0" encoding="utf-8"?>
<Component
xmlns="urn:schemas-cosylab-com:Component:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Name="DR_GFR3"
Code="SRTDerotatorImpl"
ImplLang="cpp"
Type="IDL:alma/MinorServo/SRTDerotator:1.0"
Container="MinorServoContainer"
Default="false"
/>
<?xml version="1.0" encoding="utf-8"?>
<Component
xmlns="urn:schemas-cosylab-com:Component:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Name="DR_PFP"
Code="SRTDerotatorImpl"
ImplLang="cpp"
Type="IDL:alma/MinorServo/SRTDerotator:1.0"
Container="MinorServoContainer"
Default="false"
/>
...@@ -10,6 +10,5 @@ ...@@ -10,6 +10,5 @@
ImplLang="cpp" ImplLang="cpp"
Type="IDL:alma/MinorServo/SRTProgramTrackMinorServo:1.0" Type="IDL:alma/MinorServo/SRTProgramTrackMinorServo:1.0"
Container="MinorServoContainer" Container="MinorServoContainer"
Default="true" Default="false"
/> />
<?xml version='1.0' encoding='ISO-8859-1'?>
<!--
- Author: Giuseppe Carboni
- History:
- 14-03-23 Created
-->
<SRTMinorServoProperties xmlns="urn:schemas-cosylab-com:SRTMinorServoProperties:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<physical_axes_enabled><property_name>ROTARY_AXIS_ENABLED</property_name></physical_axes_enabled>
<physical_positions><property_name>ROTATION</property_name></physical_positions>
<virtual_positions><property_name>ROTATION</property_name></virtual_positions>
<virtual_axes_units><property_name>degree</property_name></virtual_axes_units>
<virtual_offsets><property_name>OFFSET</property_name></virtual_offsets>
</SRTMinorServoProperties>
<?xml version='1.0' encoding='ISO-8859-1'?>
<!--
- Author: Giuseppe Carboni
- History:
- 14-03-23 Created
-->
<SRTMinorServoProperties xmlns="urn:schemas-cosylab-com:SRTMinorServoProperties:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<physical_axes_enabled><property_name>ROTARY_AXIS_ENABLED</property_name></physical_axes_enabled>
<physical_positions><property_name>ROTATION</property_name></physical_positions>
<virtual_positions><property_name>ROTATION</property_name></virtual_positions>
<virtual_axes_units><property_name>degree</property_name></virtual_axes_units>
<virtual_offsets><property_name>OFFSET</property_name></virtual_offsets>
</SRTMinorServoProperties>
<?xml version='1.0' encoding='ISO-8859-1'?>
<!--
- Author: Giuseppe Carboni
- History:
- 14-03-23 Created
-->
<SRTMinorServoProperties xmlns="urn:schemas-cosylab-com:SRTMinorServoProperties:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<physical_axes_enabled><property_name>ROTARY_AXIS_ENABLED</property_name></physical_axes_enabled>
<physical_positions><property_name>ROTATION</property_name></physical_positions>
<virtual_positions><property_name>ROTATION</property_name></virtual_positions>
<virtual_axes_units><property_name>degree</property_name></virtual_axes_units>
<virtual_offsets><property_name>OFFSET</property_name></virtual_offsets>
</SRTMinorServoProperties>
<?xml version='1.0' encoding='ISO-8859-1'?>
<!--
Authors: Giuseppe Carboni giuseppe.carboni@inaf.it
-->
<SRTDerotator
xmlns="urn:schemas-cosylab-com:SRTMinorServo:1.0"
xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
physical_axes="1"
virtual_axes="1"
max_speed="3.276"
acceleration="2.67"
min_range="-130"
max_range="130"
step="60"
tracking_delta="0.1"
zero_offset="12.5">
<enabled description="All physical axes enabled" />
<drive_cabinet_status description="Drive cabinet status" />
<block description="Minor servo in block status" />
<operative_mode description="Minor servo operating mode" />
<physical_axes description="Number of physical axes" />
<physical_axes_enabled description="Sequence, physical axes enabled" />
<physical_positions description="Sequence, physical axes positions" />
<virtual_axes description="Number of virtual axes" />
<plain_virtual_positions description="Sequence, plain virtual axes positions, with offsets" />
<virtual_positions description="Sequence, virtual axes positions, without offsets" />
<virtual_offsets description="Sequence, sum of user and system virtual axis offsets" />
<tracking description="Boolean indicating whether the servo is tracking the given coordinates" />
<trajectory_id description="Unsigned int, the UNIX Epoch * 1000 indicating the start time of the current trajectory" />
<total_trajectory_points description="Number of points sent for the current trajectory" />
<remaining_trajectory_points description="Remaining points of the current trajectory" />
<actPosition description="Current position, with sign inverted in respect to the LDO one"/>
<cmdPosition description="Latest commanded position, with sign inverted in respect to the LDO one" />
<positionDiff description="Difference between the commanded and the current position" />
<status description="Bit pattern indicating the status of the derotator" />
</SRTDerotator>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment