Skip to main content

Questions tagged [rospy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
10 views

Updating the values of a while loop coming from another node

So, when I try to run this particular part of the script: ...
user avatar
0 votes
1 answer
27 views

JointTrajectory Python interface

Hi, I am trying to make my own environment that will be used for reinforcement learning training, with the help of gym-gazebo. I want to train a floating gripper to pick up an object from ground. The ...
user avatar
0 votes
1 answer
4 views

How to properly shutdown a node from command coded in the script of the same node

I have a simple ros application that is used to create a .world file. Everything is working as expected unless the shutdown process. When the script ends the following message is retrieved: ...
user avatar
0 votes
2 answers
42 views

Loading robot_description dependent on rosparams

There are a few dimensions of my robot model that are subject to change at runtime, and so I would like to use the param server to set and get those values. It was easy enough to set the values, but ...
user avatar
0 votes
1 answer
1 view

when will Python 3 become the ROS standard

I understand that someone has decided to discontinue support for python 2 by 2020. Are there any plans to move rospy to use the python3 interpreter by default? Originally posted by PeterMilani on ROS ...
user avatar
0 votes
1 answer
8 views

Rospy callback attribute error

Am following a youtube tutorial (https://www.youtube.com/watch?v=DLVyc9hOvk8) with my own code: Executable: ...
user avatar
0 votes
1 answer
34 views

Proper way of calling service in rospy

I have designed a service and I am using it without any problem. However, I am having doubt about the client implementation in rospy. I am calling this service many times and hence, I am concerned ...
ravi's user avatar
  • 1,421
0 votes
1 answer
2 views

TypeError: Cannot compare to non-Duration

I want to ignore the immediate call to a function. Hence I need to keep track of the time at which the function was invoked. In other words, I want to skip the function call, if the function is being ...
ravi's user avatar
  • 1,421
0 votes
1 answer
3 views

rospy equivalent of ROS_*_NAMED

I came across a blog post about modifying the settings for logging. In the post, the ROS_WARN_NAMED function was mentioned. I hadn't seen that before and thought ...
user avatar
0 votes
1 answer
2 views

One-line object declaration in rospy

Hi, Is it possible to declare Marker from visualization_msgs.msg in one line? Below is my code: ...
ravi's user avatar
  • 1,421
0 votes
1 answer
26 views

Import error: No module named 'glob'

Dear all, I got an import error from executing roslaunch pr2_gazebo pr2_no_controllers.launch: ...
user avatar
0 votes
1 answer
51 views

TF2 how to translate vector in Python?

Hi everyone, I think I'm experiencing a severe blackout right now... A short one: in Python, how do I translate a 3D vector (a numpy array) from one TF2 frame to another considering position and ...
user avatar
0 votes
1 answer
8 views

Import error catkin_pkg while importing rosbag, roslib and rospy

I am novice to ROS and I followed the ROS installation tutorial to install ROS kinetic. After installing, I open python to import rospy, roslib and rosbag, but it throws the following error: ...
user avatar
0 votes
1 answer
12 views

rospy subscriber with multiple input

My ROS rqt plugin now works with single subscription, like ...
user avatar
0 votes
1 answer
77 views

How to start a roscore at system boot so that nodes run automatically when system is up?

I am working on a Ubuntu 14.04 system with ROS Indigo. I currently have a python script in the /home/usr path that is launched by a desktop file using auto-start. I use roslaunch inside the python ...
user avatar
0 votes
1 answer
32 views

Question on turtlesim tutorial: Go to Goal

Hello, I am new to ROS and I am trying to implement the Go to Goal tutorial in C++ (the tutorial itself is in python but wanted to implemented it in C++). The part I am having trouble understanding is,...
user avatar
0 votes
1 answer
3 views

It is possible to data from topics in xslx file?

I had read subscriber to recieve data and now curious about save that data instead of real time in xslx format (not using bag files). Are there any ways to do it? Originally posted by Sol on ROS ...
user avatar
0 votes
1 answer
42 views

How to set callback queue size in rospy

Hello, I'm currently working on a project where I use a network written in TensorFlow to segment some point clouds. I have created a node which subscribes to the point cloud topic. The callback ...
user avatar
0 votes
1 answer
15 views

relationship between rospy.init_node and rospy.Publisher?

More specifically, lets say the command rospy.init_node('topic_publisher') creates a node with the name topic_publisher and ...
user avatar
0 votes
1 answer
5 views

Where to find rospy functions documentations

Currently going through the ROS tutorials, but I can't seem to find where rospy functions are documented (Not in the roswiki at least). Take for instance this PubSub Tutorial, where should I go to ...
user avatar
0 votes
1 answer
16 views

TransformListener has unconnected trees

I have multiple tf frames which some of are dynamically published by the robot_state_publisher and some are static transformations. When using the tf.TransformListener i get the error message that ...
user avatar
0 votes
1 answer
7 views

why say.py in sound_play package cannot be used with roslaunch?

say.py works if it come with rosrun. I mean at first I have launched a launch file containing: ...
user avatar
0 votes
1 answer
1 view

Disabling output of ROS

Hi, I am getting a great amount of [ INFO] messages when i run a rospy script. I am wondering if there is a way to disable them. Originally posted by kchledowski on ROS Answers with karma: 52 on 2017-...
user avatar
0 votes
1 answer
4 views

callback models for roscpp and rospy

For example, I have a ROS node that has several callback and timers. Those callbacks and timers need to read or modify the same global variable. Should I use mutex or other locking mechanism to ...
user avatar
0 votes
1 answer
9 views

Subscribers not making callbacks

I have a listener function that subscribes to two topics as shown below, but the callbacks (which I confirmed are updating) don't seem to update some variables in the listener. I confirm that the ...
user avatar
0 votes
1 answer
12 views

ROSSerializationException while publishing TFMessage

Hi everyone, When I'm trying to publish tf2_msgs/TFMessage message, I got the following error: ...
user avatar
0 votes
1 answer
32 views

Differential drive getting ValueError: data_class [type] is not a message data class

I started to practice with python, and I am getting a few errors that I does not understand very well. This is my code: ...
user avatar
0 votes
3 answers
20 views

How can I publish exactly once when the node is run?

I want to publish a single /initialpose message when a node is run. How can I make sure it's only published once? This is what I have: ...
user avatar
0 votes
2 answers
27 views

Reset model poses in a python script

Hi! I wrote a script with a for loop, where inside I navigate a robot and save the camera output/trajectories. At the end of the loop I would like to reset the poses of the model, but unfortunately ...
user avatar
0 votes
1 answer
20 views

Rospy and udp sockets

Hi, I want to send data (x,y and yaw values) over UDP to a system that isn't running ROS (a myRIO or any other micro-controller) I am using a code written in in python (ROSpy) by someone in else that ...
user avatar
0 votes
1 answer
41 views

rospy init_node() inside imported file

I'd like to perform a rospy.init_node() inside a file imported by another file. However, this doesn't seem to work - the program hangs whenever I try this. Example (...
user avatar
0 votes
1 answer
5 views

How to execute subscriber callback on some condition?

Hi all, I am working on a small project in Python and ROS Indigo. To implement a small functionality, I have created a node in which the node has a subscriber (queue size 10) and corresponding ...
user avatar
0 votes
1 answer
25 views

tf transform tutorial issue (past extrapolation)

I'm working through the python tf tutorial and am having an issue with an extrapolation into the past. Here's the section: So let's go back to where we ended in ...
user avatar
0 votes
1 answer
19 views

How to resolve waitForTransform timeout exception regardless of Duration value in ROS Kinetic (python)?

I have gone through similar questions on this website, but none have helped resolve the problem for me. ...
user avatar
0 votes
1 answer
112 views

Explanation of rospy.Rate()

I am looking for an explanation of rospy.rate(), I have looked it in the documentation and it says the following: Convenience class for sleeping in a loop at a ...
user avatar
0 votes
4 answers
106 views

plotting real time data

I want process the data from some ros nodes and make a real time plot, preferably using matplotlib. What is the easiest way to do this? For example if I would like plot the average of two values in ...
user avatar
0 votes
1 answer
5 views

Use pycharm for Flexbe

Hi folks, I've followed the tutorials from http://wiki.ros.org/flexbe/Tutorials so that i could run the hello world behavior inside of the chrome app as well as running it in the console. Then I ...
user avatar
0 votes
1 answer
11 views

Fix the subscriber rate

Hi everyone, I wrote this code in order to retrieve a sonar range message, calculate a velocity based on it, and send it to my robot. I'm publishing at a 100Hz rate but subscribing at only 10Hz.(I've ...
user avatar
0 votes
1 answer
6 views

Importing a module that uses rospy from a module in Python3

Hi. I have a library that is fully written in Python3.5 and I want to interface it with a module that I wrote. The module that I wrote imports rospy, so it depends on Python2.7. When I try to do this ...
user avatar
0 votes
1 answer
25 views

Is wait_for_service required before every service call?

Hi, I don't fully understand the mechanics of rospy's wait_for_service function. Are we required to call wait for service every time we want to call the service, or only once when creating the ...
user avatar
0 votes
1 answer
6 views

code structure with several callbacks

Hello, I am working on a small 4WD rover. I use ultrasonic sensors, and a RPlidar for autonomous navigation and a joy for manual teleoperation. My aim is quite simple, but i am asking some questions ...
user avatar
0 votes
1 answer
68 views

What arguments for rospy.ServiceProxy?

Hello, I would want to call a service using python. Currently this command line is working : rosservice call /camera/start_capture but I can't figure out how to do ...
user avatar
0 votes
1 answer
147 views

How can I check if a service exists from Python?

This question has an answer for roscpp; what is the equivalent solution for Python? EDIT: I do not want to wait for the service. I want to take one action if the service exists and a different action ...
user avatar
0 votes
1 answer
8 views

Rospy isn't catching KeyboardInterrupt on the second iteration of the loop

I've written a publisher in Python to publish joint angles to a simple robot. The program only catches KeyboardInterrupt on the very first loop before I've ever published anything. However, as soon as ...
user avatar
0 votes
1 answer
51 views

rospy equivalent to ros::NodeHandle nh("namespace")

I'm very new to ROS and am [slightly] more versed in python than C++, so that's the route I'm currently pursuing in my learning. ...
user avatar
0 votes
1 answer
4 views

Is python 3.4 supported by rospy?

Hi, I'm working now in python 2.7, but I want to use module in python 3.4. Can it cause problems if I upgrade python version? thanks in advance Originally posted by matansar on ROS Answers with karma:...
user avatar
0 votes
1 answer
5 views

Listener does not update

Good afternoon friends I can get an image of the camera from the gazebo: /camera/image_raw. But if you change the qr code, the listener does not update. Can anyone help me with this? ...
user avatar
0 votes
1 answer
29 views

How to drop message rate? Unable to load topic_throttle

I have a topic published by baxter robot "/robot/digital_io/torso_left_itb_button0/state" that publishes at 100 Hz. As I am running a loop in the ...
user avatar
0 votes
1 answer
1 view

Shall I use ROS plugins to make ROS communicate with my Library?

Hello all, I am new to ROS and want to use it to communicate between the nodes of my own library. I want to know whether I shall create plugins to make it communicate with the parts of my library ? ...
user avatar
0 votes
1 answer
30 views

ROS_INFO_ONCE in Python

Is there an equivalent to ROS_INFO_ONCES in rospy? I found rospy.loginfo_throttle() but nothing like ...
user avatar

1 2 3
4
5
10