Accessing to Autoware_msgs/Vehicle_Status
Hello,
I am using Autoware.ai at the moment and I am trying to use the VehicleStatus Message from the Autoware_msgs. I want to send breakpedal, drivepedal and steering angle state via UDP to another computer. For that i wrote a Python script. I am using Ros-melodic on an Ubuntu 18.04 system. My Code:
#!/usr/bin/env python
import rospy
import socket
import sys
import time
import struct
from nav_msgs.msg import Odometry
from autoware_msgs import VehicleStatus
def VehicleStatusCb(msg):
values = (msg.drivepedal)
rospy.loginfo(values)
if __name__ == "__main__":
rospy.init_node('VVehicleStatus', anonymous=True) #make node
rospy.Subscriber('vehicle_status',VehicleStatus,VehicleStatusCb)
rospy.spin()
when trying to launch the script with with rosrun i receive the following error:
Traceback (most recent call last):
File "/home/ad-ros/catkin_ws/src/beginner_tutorials/scripts/listener.py", line 11, in <module>
from autoware_msgs import VehicleStatus
ImportError: cannot import name VehicleStatus
I think I installed the autoware_msgs correctly because with
rosmsg info
I can see the autoware messages and during built autoware_msgs_generate_py is executed. In fact that is my first post on the forum I hopefully gave all the information you need if not please tell me what is needed in addition.