Skip to content

Commit 2725006

Browse files
authored
Merge pull request #59 from RosProBridge/hotfix-add-from-ros-angular-conversion
Add from ros angular conversion
2 parents 88c0ae3 + 6bf9284 commit 2725006

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Runtime/Utils/RosConvertor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ public static geometry_msgs.msg.Vector3 ToRosAngular(this Vector3 v)
3939
return new geometry_msgs.msg.Vector3() { x = -v.z, y = v.x, z = -v.y };
4040
}
4141

42+
public static Vector3 FromRosAngular(this geometry_msgs.msg.Vector3 v)
43+
{
44+
return new Vector3((float)v.y, (float)-v.z, (float)-v.x);
45+
}
46+
4247
public static Quaternion FromRos(this geometry_msgs.msg.Quaternion q)
4348
{
4449
return new Quaternion((float)q.y, (float)-q.z, (float)-q.x, (float)q.w);

0 commit comments

Comments
 (0)