Skip to content

Commit

Permalink
Merge pull request #135 from Field-Robotics-Japan/develop
Browse files Browse the repository at this point in the history
Release new version
  • Loading branch information
Autumn60 authored Feb 14, 2024
2 parents 148d8b6 + b6f04a4 commit 69173ae
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Assets/UnitySensors/Runtime/Scripts/Sensors/TF/TF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public TFData[] GetTFData(string frame_id_parent, Matrix4x4 worldToLocalMatrix,
TFData tfData_self;
tfData_self.frame_id_parent = frame_id_parent;
tfData_self.frame_id_child = _frame_id;
tfData_self.position = worldToLocalMatrix * _transform.position;
tfData_self.position = (Vector3)(worldToLocalMatrix * new Vector4(_transform.position.x, _transform.position.y, _transform.position.z, 1.0f));
tfData_self.rotation = worldToLocalQuaternion * _transform.rotation;
tfData.Add(tfData_self);

Expand Down
2 changes: 1 addition & 1 deletion Assets/UnitySensors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.frj.unity-sensors",
"version": "2.0.2",
"version": "2.0.3",
"displayName": "UnitySensors",
"description": "",
"unity": "2021.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,43 +46,4 @@ public override TFMessageMsg Serialize()
return _msg;
}
}
/*
[System.Serializable]
public class TFSerializer : Serializer
{
[SerializeField]
private TFMessageMsg _msg;
private AutoHeader _header;
public TFMessageMsg msg { get => _msg; }
public void Init()
{
_msg = new TFMessageMsg();
_header = new AutoHeader();
_header.Init("");
}
public TFMessageMsg Serialize(float time, TFData[] tf)
{
_header.Serialize(time);
List<TransformStampedMsg> transforms = new List<TransformStampedMsg>();
foreach(TFData tfData in tf)
{
TransformStampedMsg transform = new TransformStampedMsg();
transform.header = _header.header;
transform.header.frame_id = tfData.frame_id_parent;
transform.child_frame_id = tfData.frame_id_child;
transform.transform.translation = tfData.position.To<FLU>();
transform.transform.rotation = tfData.rotation.To<FLU>();
transforms.Add(transform);
}
_msg.transforms = transforms.ToArray();
return _msg;
}
}
*/
}
4 changes: 2 additions & 2 deletions Assets/UnitySensorsROS/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "com.frj.unity-sensors-ros",
"version": "2.0.2",
"version": "2.0.3",
"displayName": "UnitySensorsROS",
"description": "",
"unity": "2021.3",
"dependencies": {
"com.frj.unity-sensors": "2.0.2",
"com.frj.unity-sensors": "2.0.3",
"com.unity.robotics.ros-tcp-connector": "0.7.0-preview"
},
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ There are several Prefab and Scene files available for testing each sensor.
2. In the Package Manager window, find and click the + button in the upper lefthand corner of the window. Select `Add package from git URL....`

3. Enter the git URL for the desired package.
1. For the UnitySensors, enter `https://github.com/Field-Robotics-Japan/UnitySensors.git?path=/Assets/UnitySensors#v2.0.2`.
2. For the UnitySensorsROS, enter `https://github.com/Field-Robotics-Japan/UnitySensors.git?path=/Assets/UnitySensorsROS#v2.0.2`.
1. For the UnitySensors, enter `https://github.com/Field-Robotics-Japan/UnitySensors.git?path=/Assets/UnitySensors#v2.0.3`.
2. For the UnitySensorsROS, enter `https://github.com/Field-Robotics-Japan/UnitySensors.git?path=/Assets/UnitySensorsROS#v2.0.3`.
__Note: UnitySensorsROS does not contain UnitySensors.__
4. Click `Add`.

Expand Down

0 comments on commit 69173ae

Please sign in to comment.