Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN python3 -m pip install -r requirements.txt && \
mv docker/PythonAPI.tar ./ && \
tar -xvf PythonAPI.tar && \
rm -rf PythonAPI.tar && \
mkdir /logs
mkdir logs

# update CYCLONE DDS Config for ROS
RUN mkdir /cyclonedds && \
Expand Down
7 changes: 6 additions & 1 deletion srunner/autoagents/autoware_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ def run_step(self) -> None:
waypoints.append(
self._convert_to_waypoint(waypoint).autoware_from_world_coords()
)

# autoware cannot handle than around 9 waypoints so reduce to 7 waypoints
n_waypoints = len(waypoints)
segment_size = int(n_waypoints / 7)

# self.route_node.request_route(goal_pose, waypoints)
self.route_node.publish_route(goal_pose, waypoints)
self.route_node.publish_route(goal_pose, waypoints[0::segment_size])
self.sent_route = True

# check if the current route is set
Expand Down
3 changes: 2 additions & 1 deletion srunner/autoagents/autoware_nodes/route_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ def request_route(self, goal: Pose, waypoints: list[Pose]) -> None:
future.add_done_callback(self.set_route_response_callback)

def publish_route(self, goal: Pose, checkpoints: list[Pose]) -> None:
self._publish_goal(goal)

for checkpoint in checkpoints:
self._publish_checkpoint(checkpoint)

self._publish_goal(goal)

def _publish_goal(self, goal_point) -> None:
goal = PoseStamped()
Expand Down