rospy, import variable from listener
Hello,
I'm new to ROS and to python, so I'm struggling to get some code working.
I have a publisher which sends some coordinates it has (with numpy), and a listener which receives those coordinates, sends them to another function to calculate some stuff, and gives me a variable "modified_coordinates". I need to send this variable to moveit (RVIZ), to make a robot move, but I have no idea how.
To send it to moveit I have a piece of code that connects to a node there and sends the info to the joints of the robot, and the robot should move in simulation. But I cannot run that piece of code in the callback of the listener, so I need to find a way to import "modified_coordinates" to a different script which connects to moveit. However, "import from" does not work in this case, maybe because the listener is always on?? (I need it to be on to receive new coordinates)
Any ideas?
Thanks very much in advance!! :)
Ana
Asked by langan on 2017-02-14 05:27:20 UTC
Comments
There is not enough information in this question to reproduce your problem.
Asked by tfoote on 2017-02-15 21:33:05 UTC