Skip to content

How to send routing request to apollo through code ? #90

Discussion options

You must be logged in to vote

You can do like this:
`
self.routing_request_writer = self.node.create_writer('/apollo/routing_request',
routing_pb2.RoutingRequest)

routing_request = routing_pb2.RoutingRequest()
routing_request.header.timestamp_sec = now_cyber_time
routing_request.header.module_name = 'xxx'

start_apollo_waypoint = routing_request.waypoint.add()
start_apollo_waypoint.pose.x = start_location.x
start_apollo_waypoint.pose.y = start_location.y

target_apollo_waypoint = routing_request.waypoint.add()
target_apollo_waypoint.pose.x = target_location.x
target_apollo_waypoint.pose.y = target_location.y

self.routing_request_writer.write(routing_request)
`

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AOOOOOA
Comment options

Answer selected by XiaoFei9704
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants