Skip to content

Commit 69173ae

Browse files
authored
Merge pull request #135 from Field-Robotics-Japan/develop
Release new version
2 parents 148d8b6 + b6f04a4 commit 69173ae

File tree

5 files changed

+6
-45
lines changed

5 files changed

+6
-45
lines changed

Assets/UnitySensors/Runtime/Scripts/Sensors/TF/TF.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public TFData[] GetTFData(string frame_id_parent, Matrix4x4 worldToLocalMatrix,
5454
TFData tfData_self;
5555
tfData_self.frame_id_parent = frame_id_parent;
5656
tfData_self.frame_id_child = _frame_id;
57-
tfData_self.position = worldToLocalMatrix * _transform.position;
57+
tfData_self.position = (Vector3)(worldToLocalMatrix * new Vector4(_transform.position.x, _transform.position.y, _transform.position.z, 1.0f));
5858
tfData_self.rotation = worldToLocalQuaternion * _transform.rotation;
5959
tfData.Add(tfData_self);
6060

Assets/UnitySensors/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.frj.unity-sensors",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"displayName": "UnitySensors",
55
"description": "",
66
"unity": "2021.3",

Assets/UnitySensorsROS/Runtime/Scripts/Serializers/TF/TFMsgSerializer.cs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,4 @@ public override TFMessageMsg Serialize()
4646
return _msg;
4747
}
4848
}
49-
/*
50-
[System.Serializable]
51-
public class TFSerializer : Serializer
52-
{
53-
54-
[SerializeField]
55-
private TFMessageMsg _msg;
56-
57-
private AutoHeader _header;
58-
59-
public TFMessageMsg msg { get => _msg; }
60-
61-
public void Init()
62-
{
63-
_msg = new TFMessageMsg();
64-
_header = new AutoHeader();
65-
66-
_header.Init("");
67-
}
68-
69-
public TFMessageMsg Serialize(float time, TFData[] tf)
70-
{
71-
_header.Serialize(time);
72-
List<TransformStampedMsg> transforms = new List<TransformStampedMsg>();
73-
foreach(TFData tfData in tf)
74-
{
75-
TransformStampedMsg transform = new TransformStampedMsg();
76-
transform.header = _header.header;
77-
transform.header.frame_id = tfData.frame_id_parent;
78-
transform.child_frame_id = tfData.frame_id_child;
79-
transform.transform.translation = tfData.position.To<FLU>();
80-
transform.transform.rotation = tfData.rotation.To<FLU>();
81-
transforms.Add(transform);
82-
}
83-
_msg.transforms = transforms.ToArray();
84-
return _msg;
85-
}
86-
}
87-
*/
8849
}

Assets/UnitySensorsROS/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "com.frj.unity-sensors-ros",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"displayName": "UnitySensorsROS",
55
"description": "",
66
"unity": "2021.3",
77
"dependencies": {
8-
"com.frj.unity-sensors": "2.0.2",
8+
"com.frj.unity-sensors": "2.0.3",
99
"com.unity.robotics.ros-tcp-connector": "0.7.0-preview"
1010
},
1111
"keywords": [

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ There are several Prefab and Scene files available for testing each sensor.
3030
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....`
3131

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

0 commit comments

Comments
 (0)