Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/test_turtlebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def main(floor_width=2.0):

robot_aabb = get_subtree_aabb(robot, base_link) # Computes the robot's axis-aligned bounding box (AABB)
lower, upper = robot_aabb # Decomposing the AABB into the lower and upper extrema
center = (lower + upper)/2. # Computing the center of the AABB
extent = upper - lower # Computing the dimensions of the AABB
center = (np.array(lower) + np.array(upper)) / 2.0# Computing the center of the AABB
extent = np.array(upper) - np.array(lower) # Computing the dimensions of the AABB
handles.extend(draw_point(center))
handles.extend(draw_aabb(robot_aabb))

Expand Down
5 changes: 3 additions & 2 deletions pybullet_tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,11 +1387,12 @@ def set_camera(yaw, pitch, distance, target_position=np.zeros(3)):

def get_pitch(point):
dx, dy, dz = point
return np.math.atan2(dz, np.sqrt(dx ** 2 + dy ** 2))
return np.arctan2(dz, np.sqrt(dx ** 2 + dy ** 2))

def get_yaw(point):
dx, dy = point[:2]
return np.math.atan2(dy, dx)
#return np.math.atan2(dy, dx)
return np.arctan2(dy, dx)

def set_camera_pose(camera_point, target_point=np.zeros(3)):
delta_point = np.array(target_point) - np.array(camera_point)
Expand Down