All Questions
Tagged with rospy ros-kinetic
55 questions
0
votes
2
answers
18
views
Is rospython subscriber thread safe?
Hey
I'm trying to write a python node, which has one class and two member functions as callback functions.
so a TimeSynchronizer and Subscriber in a node.
I saw in this link and tested that python ...
0
votes
1
answer
27
views
Subscriber in /odom topic from gazebo loses first message
Hello!
I have a robot in a gazebo environment that publishes the odometry data on the topic /odom. I have a node that subscribes to that topic and uses the odometry data. I save the data from the ...
0
votes
1
answer
6
views
rospy Subscriber callback threading test
I try to use rospy Subscriber callback handler to manipulate some object but it doesn't work like i would like to.
In,subscriber handler is look like this :
...
0
votes
1
answer
10
views
Importing a service in python defined by others
I am stuck in something that should be pretty easy... I have a service called "set_odometry", which I can use doing rosservice from the bash. This service is installed from apt-get so I don'...
0
votes
2
answers
5
views
Using ROS namespaces programmaticaly
It seems like the simple question, but is it possible to control robots with different ROS namespaces in one launch file programmaticaly? For example, i want to move robot1 one meter forward, and ...
0
votes
1
answer
14
views
Custom ROS message with unit8[] in python!
I have a PacketMsg.msg as follows in my package:
uint8[] buf
I would like to decode /topic ...
0
votes
1
answer
8
views
rospy message_converter outputs zero while in the terminal I got different output for the same topic
ROS Kinetic
Ubuntu 16.04
Python 3.5
I am using diff_drive_controller to publish rwheel_angular_vel_motor and lwheel_angular_vel_motor topics. My goal is to take messages published by those topics and ...
0
votes
1
answer
2
views
How to store two data of consecutive frames for computation?
I am using ROS Kinetic on ubuntu 16.04.
The application I am trying to do is to obtain messages from the VRPN optitrack system and use these data to
construct a data array that displays variables in ...
0
votes
1
answer
1
view
subcribing to 2 topics and publishing selected data in same node
hello everyone. i have two messages publishing on their message with their topic name. now i want to subscribe these two topics and publish a new topic which will take some selected data from one ...
0
votes
1
answer
1
view
[Theorical] Python use in ROS
Hi everyone,
I'm new using python in ROS but I've been developing robots solution for a little time in C++. The thing is that when you want to use a ROS C++ node you must configure CMakeLists.txt ...
0
votes
1
answer
172
views
Passing Multiple Arguments to Subscriber Callback function in python
Hi All,
I am wrote the following code to track position of my robot in rviz using markers.
...
0
votes
1
answer
31
views
How to connect remote roscore with python in runtime
The following is the implementation using roscpp:
std::map<std::string, std::string> remappings;
remappings["__master"] = master_url;
remappings["__hostname"] = host_url;
ros:...
0
votes
1
answer
129
views
How to pass multiple arguments to rospy node through command line?
I'm looking for a notation like this
rosrun my_package my_node.py arg1 arg2 arg3
That I can cun in the terminal, that will enable me to pass arguments to a ROS ...
0
votes
1
answer
20
views
Why does rospy::wait_for_message get stucked even though messages are being published?
I am using this method in my python script
rospy.wait_for_message("/my_topic", Bool, timeout=None)
The /my_topic ...
0
votes
1
answer
12
views
How to get the Quaternion from Matrix with python
Hello,
I found below code which is using for get the Quaternion values from Matrix.
Then, I would like to do the same work with it, but it's C++ programming language.
I can't find any similar python ...
0
votes
1
answer
138
views
How to transform a vector in rospy?
I couldn't find any tutorials for my situation.
I have a vector (23.7, 0, 0) and I want to transform (only rotation no translation needed) it into another frame which is RPY (0.39, 0, 1.64).
I'm ...
0
votes
1
answer
11
views
Please explain how the Subscriber works
Hello,
Could someone explain to me how the rospy.Subscriber('topic', msg, callback) method works. As I noticed we don't need to loop that method to update and check the topic iteratively. It is doing ...
0
votes
1
answer
1
view
rospy tf get frame_id of trans, rot
Hey there,
Assume I have three tf's:
1): marker_1 relative to world
2): marker_2 relative to world
3): marker_3 relative to world
Now I want to get the marker name that is closest to marker_1. Is ...
0
votes
1
answer
17
views
How to publish sim time at desired frequency
Hi, I want to run the simulated time at frequency of 1Hz by publishing to the /clock topic and set rosparam /use_sim_time to be ...
0
votes
1
answer
30
views
How to read data from txt file python
I have a python script which reads data from 4 txt files and stores the values in 4 numpy arrays. I put the txt files in the same directory with my python node, but when I run the node the files ...
0
votes
1
answer
11
views
Own nav path has closed loop in rviz
Hi,
I want to make simple path following for differential drive robot,
So, I generated nav.msg/Path with own points and publish it, but in rviz I see my path with connection between start and end ...
0
votes
2
answers
186
views
check if topic is being published to without subscribing
In our project we want to write a node to check sensor nodes for possible errors. One of the checked criterion is, if the topics of the node are actually published and not just have publisher.
Is it ...
0
votes
1
answer
62
views
no module named rospy after anaconda install
Hello all,
I was using ros kinetic with py scipts without problem, but then I tried installing Anaconda 3.5 and all my ROS is messed as you guess. So I uninstalled Anaconda 3.5 and installed Anaconda ...
0
votes
1
answer
14
views
roslib.message.get_message_class returns None
I'm trying to create a tool that can dynamicly read service call descriptions from a yaml file and call the services accordingly. (in rospy on kinetic)
If i try to resolve a non-standard service type ...
0
votes
1
answer
27
views
while loop only executes subscriber callback()
Hi,
the key code parts:
...
0
votes
1
answer
26
views
Infinite loop in callback function
Hi there!
I want to subscribe to a topic (real_position) and save these data in a variable (julio) in order to process them later in my code. I've tried to use something similar to the tutorial for ...
0
votes
1
answer
159
views
Error: bad interpreter: No such file or directory
I am trying to run the following node using rosrun, to send data through my serial port and I get the error:
...
0
votes
1
answer
73
views
Error on import ros packages
I`m trying to write a ros module in python, but I'm facing this issue below:
...
0
votes
1
answer
43
views
Static tf2 transform returns correct position but opposite quaternion
Trying to read the state of my robotic arm, I found that the manufacturer provided transforms for everything up to the flange but not to the center of the closed fingers in the end effector. In the ...
0
votes
1
answer
47
views
Rospy Parameter KeyError
I cannot get my code to get the parameters on my config file. I just do like it is on the tutorials but it does not work and I do not understand why. I believe it might be a namespace problem with ...
0
votes
1
answer
1
view
parse $(find ...) from python?
Hi everyone,
how can I make use of the ROS API to parse roslaunch macros like $(find <package>)?
Thanks
Originally posted by Hendrik Wiese on ROS Answers ...
0
votes
1
answer
170
views
How to use timer callback in ROS?
I am working with ROS Kinetic. Like in ROS2, we can use a create_timer() function as described here.
Similarly I would want to use a similar functionality in rospy ...
0
votes
1
answer
74
views
genpy.message.SerializationError when calling service /gazebo/set_model_configuration
Hi,
I want to implement a node, that calculates random values for the joints of my robot and publishes them. Furthermore, I want to call the service ...
0
votes
1
answer
19
views
Check if target joint position is valid
Hi,
I was wondering if there is a way to check if a goal pose of a planned path (planned in moveit with OMPL) is a valid pose, meaning that joint position constraints, collision, etc. are taken into ...
0
votes
1
answer
22
views
tf::Quaternion getAngle() eqivalent for rospy
Is there an equivalent to the getAngle() method of C++ interface of tf in Python version too?
Originally posted by smihael on ROS Answers with karma: 45 on 2018-09-10
Post score: 0
0
votes
1
answer
3
views
Python source for built-in message types
Where can I find Python source code for the built-in message types? I need them for a presentation. I've looked for them but I guess that they are not on GitHub but that they are generated during ...
0
votes
1
answer
5
views
writing a service to publish only once in a latched topic
Hello,
I am writing a Service which should save a value from a topic to another latched topic so I can use that value later
I am using the following code and my topic seems to be not connected to the ...
0
votes
1
answer
49
views
rospy.init_node in multiprocessing.Process
Hello everyone,
I have the following setup:
The main thread which starts a ROS node with services, pubs, and subs
A multiprocessing.Process which also should start an (anonymous) ROS node that has ...
0
votes
1
answer
1
view
Consequence of setup.py
Hi,
I am currently setting up my first python based node. I have included a setup.py into my project and added the "catkin_python_setup()" macro in my CMakeLists.txt. I am now wondering, ...
0
votes
1
answer
18
views
python rostest fails to import python module
Hello,
I'm using ROS kinetic on an ubuntu 16.04 machine and have been trying to use rostest to run unit tests (and hopefully integration tests in the future). I keep running into problems when trying ...
0
votes
1
answer
8
views
Nodes not deactivated when process is ended
What I am doing
I am running the ROS Tutorial Writing a Publisher (python).
What I am using
Ubuntu 16.04
ROS kinetic
Python 2.7
What I want to know
I built the code using ...
0
votes
1
answer
26
views
Logger conflicts with my own logger
When I call rospy.init_node, logging of errors using my own defined logger stops working and nothing is displayed. For example when I call an object without its ...
0
votes
1
answer
5
views
Rospy publish is unreliable
I'm seeing something real strange involving a rospy Publisher.
When I run a rospy node on a development machine (not the robot), messages sent by a publisher may or may not be received by the master ...
0
votes
1
answer
12
views
big delay between publisher and subscriber?
I made a package to control the nao robot using the Emotic EPOC+ EEG sensor to drive the robot depends on the facial expressions
basically my package consist of two nodes
1- Publisher : which read the ...
0
votes
1
answer
35
views
Roslaunch can't locate node, but rosrun works fine
I'm working on a simple node written entirely in python. To make it work with roslaunch, I made it into a package. I got the package working fine, and I can run ...
0
votes
1
answer
2
views
Advanced tutorial for rospy services?
Please don't link me to the beginner tutorial. This is beyond the provided examples. Let's define MySrv.srv as:
...
0
votes
1
answer
9
views
rospy publishers using tons of CPU
I have a node with a number of subscribers and publishers in it. Most of them have no problem, but 2 in particular running at 100hz are taking up about 15% of an i7 CPU set with a queue_size of 10.
...
0
votes
1
answer
42
views
Get Arm Gravity Compensation Joint Efforts from URDF, Joint Positions, and Grav Vector?
Given:
a URDF
the current joint positions
a gravity vector
I want to calculate the joint efforts needed to compensate for gravity ("achieve weightlessness").
Is there an existing (ROS) ...
0
votes
1
answer
16
views
How to dynamically launch and kill nodes?
Is there any best practice and/or guides surrounding how to dynamically launch and kill nodes?
I'm building a small Raspberry Pi based robot, and since it only has 1GB of memory and limited CPU, I don'...
0
votes
1
answer
5
views
Wrong argument type when writing quaternion orientation to pose message
Edit:
I tried to just simply copy the quaternion values and hardcode them as an orientation coordinates. Results are the same, so maybe problem comes from another part of my grasp msg?
I dumped the ...