ros

How can I properly call a method from its callback method within a class?

How can I properly call a method from its callback method within a class? Question: I Have a code with two functions. Function ‘send_thread’ and Function ‘receive_thread’ which is the callback of ‘send_thread’. What I want to do is to run ‘send_thread’, this activates ‘receive_thread’ and once it’s over repeat it all again. To do …

Total answers: 2

Is it possible to time synchronize two topics in ROS of same message type?

Is it possible to time synchronize two topics in ROS of same message type? Question: I try to map robot gripper position to the resistance exerted by the object held by the gripper. I subscribed the gripper position from one topic and resistance value from another topic, since I want to ensure that the gripper …

Total answers: 1

How to subscribe and publish images in ROS

How to subscribe and publish images in ROS Question: I am trying to subscribe to the “/camera/image_color” topic which is data from my camera. I then want to do some voodoo on these images in opencv and publish them at a specific frequency. So that I can subscribe to them with another node. I have …

Total answers: 2

How to import ros to PyCharm

How to import ros to PyCharm Question: I am developing a robot using the ros framework. As ide, I use PyCharm. But I can’t import ros into it. On the ros site there is the article about ide http://wiki.ros.org/IDEs. There is information about using ros with pycharm. I have to modify the .desktop file, but …

Total answers: 3

Live 2D laser scanner data in rospy

Live 2D laser scanner data in rospy Question: I just got a Sick Tim 571 laser scanner. Since I’m new to ROS I wanted to test some stuff in an easy rospy implementation. I thought that the code below will show me a live output of the laser measurements like it is possible in Rviz …

Total answers: 3

ImportError: No module named catkin_pkg.packages

ImportError: No module named catkin_pkg.packages Question: I am trying to run:- roslaunch turtlebot_gazebo turtlebot_world.launch but I am getting following error Traceback (most recent call last): File “/opt/ros/kinetic/share/xacro/xacro.py”, line 55, in <module> import xacro File “/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/__init__.py”, line 42, in <module> from roslaunch import substitution_args File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py”, line 56, in <module> from .launch import ROSLaunchRunner File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py”, …

Total answers: 4

ROS publishing array from python node

ROS publishing array from python node Question: I’m new to ros+python and i’m trying to publish a 1-D array from python ros node. I used Int32MultiArray but i cant understand the concept of layout in multiarray. Can anyone explain it to me? or is there any other way of publishing an array ? Thanks. #!/usr/bin/env …

Total answers: 4

ros python publisher/subscriber

ros python publisher/subscriber Question: I am trying to subscribe to a 4 different publishers in ROS through python. I use the following code : def callback(data): rospy.loginfo (” Publisher1 Value %s “, custom_msg1.custom_string1) rospy.loginfo (” Publisher2 Value %s “, custom_msg2.custom_string2) rospy.loginfo (” Publisher3 Value %s “, custom_msg3.custom_string3) rospy.loginfo (” Publisher4 Value %s “, custom_msg4.custom_string4) rospy.loginfo …

Total answers: 2