ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Accessing to Autoware_msgs/Vehicle_Status

asked 2020-09-21 09:36:12 -0600

BBlumhofe gravatar image


I am using 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)

if __name__ == "__main__":
    rospy.init_node('VVehicleStatus', anonymous=True) #make node 

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/", 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-09-21 12:49:28 -0600

gvdhoorn gravatar image

It's most likely from autoware_msgs.msg, instead of from autoware_msgs.

Similar to from nav_msgs.msg you use earlier.

edit flag offensive delete link more


Thank you so much! That was really stupid ... Your solution worked perfectly

BBlumhofe gravatar image BBlumhofe  ( 2020-09-22 02:58:49 -0600 )edit

Question Tools


Asked: 2020-09-21 09:36:12 -0600

Seen: 839 times

Last updated: Sep 21 '20