Problems importing ROS messages (ROS Noetic)
I am writing a code in Python to create a node to subscribe to a topic, however, I am having a little problem with the libraries, when I write the messages that I need to import, it appears in VSCode that I do not have access to them. On the screen it tells me that I cannot access the String of std_msgs.msg nor Joy of sensor_msgs.msg. Does anyone know how I can fix that error?
ROS Answers still won't let me upload photos because I'm new but what I wrote at the top of my code is:
#!/usr/bin/env python3
# encoding: utf-8
import rospy
#It won't let me import these two messages:
from std_msgs.msg import String
from sensor_msgs.msg import Joy
from control_msgs.msg import FollowJointTrajectoryActionGoal
import math
If I click on String or Joy I get a message that says: "String" is not accessed Pylance