Questions tagged [rospy]
The rospy tag has no usage guidance.
478 questions
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
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
88
views
rospy.wait_for_message is unable to subscribe to a message
rospy.wait_for_message can receive one message from topic. It will create a new subscription to the topic, receive one message, then unsubscribe. But when I try to use it, the function can't work at ...
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
32
views
Where are my node log files?
We have a system with a few dozen nodes, started from a top-level launch file consisting mostly of <include> tags. Most of them are ...
0
votes
1
answer
107
views
Unable to publish PoseStamped message
I am trying to publish a PoseStamped message via a node running in Python. I am listening for this message on another tab in my terminal.
Python node:
...
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
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
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
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
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
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
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
5
views
How to invoke a subscriber's callback periodically?
Hello everyone,
I would like to sample messages from my sensors' topics every 15 seconds (mostly) synchronically, using message_filters.ApproximateTimeSynchronizer. Is that any possible way to ...
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 ...
1
vote
1
answer
186
views
How to subscribe for a single message from a topic (receive once and then stop)
I would like to get a single message from a topic. Is there a built-in, simple, elegant way to do this? Currently, I am creating a subscriber, and using a ...
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
7
views
Global Costmap Updating Mysteriously
Hello everyone! I'm experiencing some weird behavior while using costmaps in move_base which I hope someone can shed some light on.
Thanks in advance to anyone who ...
0
votes
1
answer
3
views
Accessing previous estimated joint states of a robot
Hi,
I am new to ROS and I am trying to implement a Kalman filter for estimating the joints velocity and acceleration of a robotic manipulator.
The angular position of each joint is published to the ...
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
12
views
gazebo and timer.py(rate.sleep)
Hi
I'm running yappi to profile the performance of my node written in python.
The node has:
3 timers for controller loops. (2 at 500Hz and 1 at 100Hz)
2 publisher (60Hz for /gazebo/set_model_state ...
0
votes
1
answer
10
views
"True" parallelization in rospy with subscribers
Hey everyone,
Using Rospy (python 2.7) with Indigo.
I ran into the issue that once I command a moveit group to "go" with wait=True it will be a blocking call that causes my subscription to ...
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 ...
0
votes
1
answer
178
views
rospy.exceptions.ROSInitException - time is not initialized
Hello,
I was just testing my websocket, for which I was using the basic ros publisher subscriber tutorial. These worked until last week, and I haven't touched this package until today.
error thrown ...
0
votes
1
answer
13
views
rospy: node namespace is empty
I got the impression that a node per default has a namespace matching the node name.
Mini example, I run this node:
...
0
votes
1
answer
6
views
Error on action_client as topic callback
I'm trying to implement a node that subscribes to a topic to get a list of geometry_msgs/Points and then send it to ...
0
votes
1
answer
18
views
Don't block on rospy.init_node
Hello,
Simple question : is there a way for not blocking on init_node call ?
Doing it (Python) ;
init_node("MyNode", disable_signals=True)
if ...
0
votes
1
answer
1
view
Clearing PlanningScene at beginning of script (moveit_commander)
Hello everyone,
i have a script where i add objects to the Planning Scene in MoveIt!. I want to clear all previously added objects at the beginning of the script, however, that does not work. What am ...
0
votes
1
answer
5
views
importErrors when coding with rospy
I still have no Idea what I'm doing, so keep in mind that I have no idea on earth what "rebuid your JPMML-SparkML-Package EGG file" means, or what "build your numpy again" means. ...
0
votes
1
answer
19
views
Getting model state via rospy
Hello there,
In my reinforcement learning simulation I am trying to get the pose of one of the models to use it for some calculations. Although I think I am using correct methods, the results are not ...
0
votes
1
answer
11
views
Calling a third party service on a client
I'm trying to write a service client in python to enable_motors of hector_quadrotor. I would like to turn on engine on my code ...
0
votes
1
answer
15
views
pass python objects in ROS messages and services
Is there a way to define a ROS message or service with arbitrary python objects? Is the only option to use a string and use json.dumps / json.loads?
Originally posted by waspinator on ROS Answers ...
0
votes
1
answer
3
views
PYTHON + ROS + V-REP
Hi
I have got a problem with publish data. I want to publish msg.linear.x and msg.linear.y to V-REP via ROS.
When I write in terminal
...
0
votes
1
answer
11
views
Problem with yaml
Hi,
I use ROS Indigo on Raspbian. When I try turn on a program, I have got error:
...