Skip to content

Commit

Permalink
refactor: remove debug logging from sensor implementations in env_uti…
Browse files Browse the repository at this point in the history
…l.py
  • Loading branch information
ll7 committed Dec 6, 2024
1 parent dc942dd commit 5a4d2c6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions robot_sf/gym_env/env_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,14 @@ def init_ped_collision_and_sensors(

# Define the ray sensor, target sensor, and speed sensor for the robot
def ray_sensor(r_id=0):
logger.debug("ray_sensor: This is the first implementation called")
return lidar_ray_scan(sim.robots[r_id].pose, occupancies[r_id], lidar_config)[0]

def target_sensor(r_id=0):
logger.debug("target_sensor: This is the first implementation called")
return target_sensor_obs(
sim.robots[r_id].pose, sim.goal_pos[r_id], sim.next_goal_pos[r_id]
)

def speed_sensor(r_id=0):
logger.debug("speed_sensor: This is the first implementation called")
return sim.robots[r_id].current_speed

# Initialize a sensor fusion object for the robot for sensor data handling
Expand Down Expand Up @@ -283,17 +280,14 @@ def speed_sensor(r_id=0):
)

def ray_sensor_ego_ped():
logger.debug("ray_sensor: This is the second implementation called")
return lidar_ray_scan(sim.ego_ped.pose, occupancies[1], lidar_config)[0]

def target_sensor_ego_ped():
logger.debug("target_sensor: This is the second implementation called")
return target_sensor_obs(
sim.ego_ped.pose, sim.ego_ped_goal_pos, None
) # TODO: What next goal to choose?

def speed_sensor_ego_ped():
logger.debug("speed_sensor: This is the second implementation called")
return sim.ego_ped.current_speed

sensor_fusions.append(
Expand Down

0 comments on commit 5a4d2c6

Please sign in to comment.