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

[VDA5050] Navigate through nodes #47

Open
wants to merge 23 commits into
base: humble-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a254aaf
Fix some typos in the schema and the vda5050 controller
Jul 5, 2023
f64b852
Added the py tests to the cmake file. Also began a stitch test becaus…
Jul 6, 2023
f75a25a
Stitched test works. And controller fixed.
Jul 7, 2023
e1d3f79
Comments
Jul 7, 2023
93a58ad
Added action_type to Current Action mmsg
Jul 7, 2023
1455a96
Fix Error description in actions
Jul 7, 2023
b932484
Keep track of current Node goal to avoid race condition when the Proc…
Jul 14, 2023
1de16f5
Current node goal reset in process node now
Jul 17, 2023
8075313
Added starting node ID param
Jul 19, 2023
1be57f8
Fix linting
Aug 4, 2023
aac4431
Begin the conversion from goto node to navigate through nodes
Aug 8, 2023
96cc39a
Update vda5050_connector/vda5050_connector_py/vda5050_controller.py
bobbleballs Aug 9, 2023
f0e71d6
Update CMakeLists.txt
leandropineda Aug 9, 2023
81b1964
Merge branch 'humble-devel' into openTCS-vda-integration
Aug 9, 2023
fcdafa4
Merge branch 'openTCS-vda-integration' into nav_through_nodes
Aug 9, 2023
f7a6c1f
More stuff enabling nav through nodes.
Aug 9, 2023
7adbd21
added nav through nodes actions and begun writing test harness
Sep 1, 2023
fbf8565
Added the nav through poses feedback and some tests to ensure they're…
Sep 12, 2023
a7a3466
Merge remote-tracking branch 'private/humble-devel' into nav_through_…
Sep 12, 2023
0516117
Added test that does a whole order with no gaps in released status
Sep 12, 2023
8a40def
Add comment
Sep 13, 2023
50f551b
Comments and linting
Sep 14, 2023
2cb4c41
SOFT actions also cause driving to stop.
Oct 12, 2023
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
1 change: 1 addition & 0 deletions vda5050_connector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ find_package(vda5050_msgs REQUIRED)
# BUILD

rosidl_generate_interfaces(${PROJECT_NAME}
"action/NavigateThroughNodes.action"
"action/NavigateToNode.action"
"action/ProcessVDAAction.action"
"srv/GetState.srv"
Expand Down
11 changes: 11 additions & 0 deletions vda5050_connector/action/NavigateThroughNodes.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Goal
vda5050_msgs/Edge[] edges
vda5050_msgs/Node[] nodes
---
# Result
std_msgs/Empty result
---
# Feedback
vda5050_msgs/AGVPosition position
vda5050_msgs/Velocity velocity
vda5050_msgs/Node last_node
58 changes: 58 additions & 0 deletions vda5050_connector/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@

import rclpy
from vda5050_connector.action import NavigateToNode
from vda5050_connector.action import NavigateThroughNodes
from vda5050_connector.action import ProcessVDAAction
from vda5050_connector_py.vda5050_controller import DEFAULT_NAV_TO_NODE_ACT_NAME
from vda5050_connector_py.vda5050_controller import DEFAULT_NAV_THROUGH_NODES_ACT_NAME
from vda5050_connector_py.vda5050_controller import DEFAULT_VDA_ACTION_ACT_NAME
from vda5050_connector.srv import GetState
from vda5050_connector_py.vda5050_controller import DEFAULT_GET_STATE_SVC_NAME
Expand Down Expand Up @@ -95,6 +97,57 @@ def publish_feedback(self, feedback):
self.feedback_pub.publish(feedback_message)


class MockActionServerNavigateThroughNodes:
def __init__(self, node):
self.logger = node.get_logger()
self.goal_srv = node.create_service(
NavigateThroughNodes.Impl.SendGoalService,
f"/vda5050/robots/robot_1/{DEFAULT_NAV_THROUGH_NODES_ACT_NAME}/_action/send_goal",
self.goal_callback,
)
self.cancel_srv = node.create_service(
NavigateThroughNodes.Impl.CancelGoalService,
f"/vda5050/robots/robot_1/{DEFAULT_NAV_THROUGH_NODES_ACT_NAME}/_action/cancel_goal",
self.cancel_callback,
)
self.result_srv = node.create_service(
NavigateThroughNodes.Impl.GetResultService,
f"/vda5050/robots/robot_1/{DEFAULT_NAV_THROUGH_NODES_ACT_NAME}/_action/get_result",
self.result_callback,
)
self.feedback_pub = node.create_publisher(
NavigateThroughNodes.Impl.FeedbackMessage,
f"/vda5050/robots/robot_1/{DEFAULT_NAV_THROUGH_NODES_ACT_NAME}/_action/feedback",
1,
)
self.goal_status_pub = node.create_publisher(
NavigateThroughNodes.Impl.GoalStatusMessage,
f"/vda5050/robots/robot_1/{DEFAULT_NAV_THROUGH_NODES_ACT_NAME}/_action/status",
qos_profile_action_status_default,
)

def goal_callback(self, request, response):
# Save goal ID to send feedback later
self.goal_id = request.goal_id
response.accepted = True
self.logger.info(f"Goal received {response}")
return response

def cancel_callback(self, request, response):
response.goals_canceling.append(request.goal_info)
return response

def result_callback(self, request, response):
self.logger.info(f"Result callback: {response}")
return response

def publish_feedback(self, feedback):
feedback_message = NavigateThroughNodes.Impl.FeedbackMessage(
goal_id=self.goal_id, feedback=feedback
)
self.feedback_pub.publish(feedback_message)


class MockActionServerProcessVDAAction:
def __init__(self, node):
self.logger = node.get_logger()
Expand Down Expand Up @@ -163,6 +216,11 @@ def action_server_nav_to_node(adapter_node):
return MockActionServerNavigateToNode(adapter_node)


@pytest.fixture()
def action_server_nav_through_nodes(adapter_node):
return MockActionServerNavigateThroughNodes(adapter_node)


@pytest.fixture
def action_server_process_vda_action(adapter_node):
return MockActionServerProcessVDAAction(adapter_node)
Expand Down
Loading