Skip to content

Commit

Permalink
fixed opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
PeruDayani committed Nov 20, 2020
1 parent 6bb7094 commit e9bea51
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Assets/Scripts/ROS Scripts/ROS Connections v2/ROSManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ private ROSSensorConnectionInterface InstantiateSensor(ROSSensorConnectionInput

GameObject sensor = new GameObject(rosSensorConnectionInput.sensorName);
sensor.transform.parent = this.transform;
sensor.transform.localPosition = new Vector3(7.33f, 3.387f, 15.27f);
sensor.transform.localRotation = Quaternion.Euler(new Vector3(-5.811f,-208.85f,1.375f));
sensor.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
//sensor.transform.localPosition = new Vector3(7.33f, 3.387f, 15.27f);
//sensor.transform.localRotation = Quaternion.Euler(new Vector3(-5.811f,-208.85f,1.375f));
//sensor.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);

switch (sensorType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,59 +143,66 @@ public ROSBridgeMsg OnReceiveMessage(string topic, JSONNode raw_msg, ROSBridgeMs
parsePCFaceMesh = true;
if (WorldProperties.radiationDataType == WorldProperties.RadiationDataType.gamma)
{
color = new Color(255.0f, 204.0f, 204.0f, alpha);
Debug.Log("Gamma");
color = new Color(255.0f, 204.0f, 204.0f, alpha/ 6.0f);
}
else
{
color = new Color(229.0f, 204.0f, 255.0f, alpha);
Debug.Log("Neutron");
color = new Color(229.0f, 204.0f, 255.0f, alpha / 6.0f);
}
break;
case "/colorized_points_faced_4":
Debug.Log("PC Face Mesh Visualizer Callback: " + topic);
parsePCFaceMesh = true;
if (WorldProperties.radiationDataType == WorldProperties.RadiationDataType.gamma)
{
color = new Color(255.0f, 153.0f, 153.0f, alpha);
Debug.Log("Gamma");
color = new Color(255.0f, 153.0f, 153.0f, alpha / 5.0f);
}
else
{
color = new Color(204.0f, 153.0f, 255.0f, alpha);
Debug.Log("Neutron");
color = new Color(204.0f, 153.0f, 255.0f, alpha / 5.0f);
}
break;
case "/colorized_points_faced_3":
Debug.Log("PC Face Mesh Visualizer Callback: " + topic);
parsePCFaceMesh = true;
if (WorldProperties.radiationDataType == WorldProperties.RadiationDataType.gamma)
{
color = new Color(255.0f, 102.0f, 102.0f, alpha);
Debug.Log("Gamma");
color = new Color(255.0f, 102.0f, 102.0f, alpha / 4.0f);
}
else
{
color = new Color(178.0f, 102.0f, 255.0f, alpha);
Debug.Log("Neutron");
color = new Color(178.0f, 102.0f, 255.0f, alpha / 4.0f);
}
break;
case "/colorized_points_faced_2":
Debug.Log("PC Face Mesh Visualizer Callback: " + topic);
parsePCFaceMesh = true;
if (WorldProperties.radiationDataType == WorldProperties.RadiationDataType.gamma)
{
color = new Color(255.0f, 51.0f, 51.0f, alpha);
Debug.Log("Gamma");
color = new Color(255.0f, 51.0f, 51.0f, alpha / 3.0f);
}
else
{
color = new Color(153.0f, 51.0f, 255.0f, alpha);
color = new Color(153.0f, 51.0f, 255.0f, alpha / 3.0f);
}
break;
case "/colorized_points_faced_1":
Debug.Log("PC Face Mesh Visualizer Callback: " + topic);
parsePCFaceMesh = true;
if (WorldProperties.radiationDataType == WorldProperties.RadiationDataType.gamma)
{
color = new Color(255.0f, 0, 0, alpha);
color = new Color(255.0f, 0, 0, alpha / 2.0f);
}
else
{
color = new Color(127.0f, 0, 255.0f, alpha);
color = new Color(127.0f, 0, 255.0f, alpha / 2.0f);
}
break;
case "/colorized_points_faced_0":
Expand Down

0 comments on commit e9bea51

Please sign in to comment.