apollo
apollo copied to clipboard
Get Position and Driver Input Data
Hi all,
My issue is the following. In the past i worked with Autoware and need to send the information about position, steeringwheel angle, drivepedal and breakpedal via UDP to another computer. With Autoware i wrote a ROS-node doing that for me. In fact that Apollo 6.0 works with Cyber RT i don't know how to do that. Does anyone have an idea how to do that? I work with Apollo 6.0 and lgsvl 2020.06
Regards
lgsvl do have a bridge, you can ref there forked branch apollo
Is there a documentation for the bridge ? After launching the bridge i tried rostopic list bit i always get the error "ERROR: Unable to communicate with master!" in LGSVL I can the Bridge Status is Connected.
Here are some reference links, you can read and try.
Example JSON Configuration for an Apollo 5.0 Vehicle
Launching Apollo alongside the Simulator
Bridge Menu
Hi,
I am sorry but I don't see how the links will help me. I know that there is a bridge for the communication between LGSV and apollo and i can configure which data is available in the JSOn file.
What I don't know is how I can access the data. In Autoware I wrote a python listener which subscribed to several ros-topics. The subscriber sends the information via UDP to a different computer. I found this issue: https://github.com/ApolloAuto/apollo/issues/12265 but it's not solved yet...
cyber
cyber use cyber node to publish and subscribe msg, If you want to work with cyber use python, you can ref to link
Use the talker.py and listener.py example.
thanks i will try it !
So after putting that task to side for a while i tried to use the listener.py example to at first read the values of the apollo/control comand. The following code results in the following error: AttributeError: module 'cyber_py3.cyber' has no attribute 'get_msgtype'. my python scirpt is located at: apollo/cyber/python/cyber_py3/examples
#!/usr/bin/env python3
import sys
sys.path.append("../")
from cyber_py3 import cyber
def callback(data):
print("Control_Comand:")
print(data)
def test_listener_class():
test_node = cyber.Node("listener")
ControlCommand = cyber.get_msgtype("apollo/control", sleep_s=5)
test_node.create_reader("apollo/control", ControlCommand, callback)
test_node.spin()
if __name__ == '__main__':
cyber.init()
test_listener_class()
cyber.shutdown()
@BBlumi97
did you solve the problem?
'cyber_py3.cyber' has no attribute 'get_msgtype'
I found that the get_msgtype is a method of this class Channel Utils (object) but not cyber
@BBlumi97 did you solve the problem?
No i didn't i wrote a plugin to read the data from lgsvl instead of apollo
@BBlumhofer do you have an idea how to print and send the data of objects detected via UDP, please? I am lost
I could manage to run autowarei n Xavier and everything works well I am try to send the data of objects detected via UDP, like x y z and distance please help me