Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(demos): wrong argument name and type in priority of task #325

Merged
merged 2 commits into from
Nov 28, 2024
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
8 changes: 4 additions & 4 deletions examples/agriculture-demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def check_tractor_state(self):

# Send goal to perform_task action server
goal_msg = Task.Goal()
goal_msg.priority = 10
goal_msg.priority = "high"
goal_msg.description = ""
goal_msg.task = "Anomaly detected. Please decide what to do."

Expand Down Expand Up @@ -117,7 +117,7 @@ def main():
f"{tractor_prefix}/camera_image_color": describe_ros_image
}

topics_whitelist = [
topics_allowlist = [
"/rosout",
f"{tractor_prefix}/camera_image_color",
# Services
Expand All @@ -127,7 +127,7 @@ def main():
f"{tractor_prefix}/replan",
]

actions_whitelist = []
actions_allowlist = []

SYSTEM_PROMPT = f"""
You are autonomous tractor {tractor_number} operating in an agricultural field. You are activated whenever the tractor stops due to an unexpected situation. Your task is to call a service based on your assessment of the situation.
Expand All @@ -146,7 +146,7 @@ def main():
rai_node = RaiStateBasedLlmNode(
observe_topics=observe_topics,
observe_postprocessors=observe_postprocessors,
whitelist=topics_whitelist + actions_whitelist,
allowlist=topics_allowlist + actions_allowlist,
system_prompt=SYSTEM_PROMPT,
tools=[
Ros2ShowMsgInterfaceTool,
Expand Down
6 changes: 3 additions & 3 deletions examples/rosbot-xl-demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def main():
#
# observe_postprocessors = {"/camera/camera/color/image_raw": describe_ros_image}

topics_whitelist = [
topics_allowlist = [
"/rosout",
"/camera/camera/color/image_raw",
"/camera/camera/depth/image_rect_raw",
Expand All @@ -57,7 +57,7 @@ def main():
"/led_strip",
]

actions_whitelist = [
actions_allowlist = [
"/backup",
"/compute_path_through_poses",
"/compute_path_to_pose",
Expand Down Expand Up @@ -126,7 +126,7 @@ def main():
node = RaiStateBasedLlmNode(
observe_topics=None,
observe_postprocessors=None,
whitelist=topics_whitelist + actions_whitelist,
allowlist=topics_allowlist + actions_allowlist,
system_prompt=SYSTEM_PROMPT,
tools=[
Ros2PubMessageTool,
Expand Down