Skip to content

Commit

Permalink
make the ROS odometry (yaw) consistent with non-ROS
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith committed May 27, 2022
1 parent 55348ca commit 962db84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions droidlet/lowlevel/hello_robot/remote/stretch_ros_move_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def get_slam_pose(self):
]
)
euler = euler_from_quaternion(quat)
return (pose.pose.pose.position.x, pose.pose.pose.position.y, euler[2])
yaw = euler[2] + math.pi
return (pose.pose.pose.position.x, pose.pose.pose.position.y, yaw)
else:
return (0.0, 0.0, 0.0)

Expand All @@ -89,7 +90,8 @@ def get_odom(self):
]
)
euler = euler_from_quaternion(quat)
return (pose.pose.position.x, pose.pose.position.y, euler[2])
yaw = euler[2] + math.pi
return (pose.pose.position.x, pose.pose.position.y, yaw)

def get_joint_state(self, name=None):
with self._lock:
Expand Down

0 comments on commit 962db84

Please sign in to comment.