Skip to main content

Questions tagged [rospy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
29 views

Accessing rviz view (Camera + Marker) in rospy

I want to get the rviz view, which is showing me visualization marker on the top of camera view in a single image. Please see below the rviz view: I tried to view the image topic but it doesn't ...
ravi's user avatar
  • 1,421
0 votes
1 answer
67 views

How to plot the path and the movement of a robot?

I am using turtlebot in gazebo and rviz. The robot moves from A to B, and I am wondering if there is an easy way (without the need to use matlab) to plot the path that robot finds (e.g. based on the ...
user avatar
0 votes
1 answer
13 views

Can I use the Python Ros bag API without making a workspace?

I'm using roscpp, but I'd like to make a transferrable python script for working with bag files. However, the docs only tell me how to do it through a catkin workspace. Is there a way to import the ...
user avatar
0 votes
1 answer
10 views

How can I dynamically get the coordinate of a model from gazebo?

I'm using Gazebo/ROS with TurtleBot. My robot needs to find the distance from itself to all the obstacles that exist in the environment. I believe Laserscan has this information, but I am not sure how ...
user avatar
0 votes
1 answer
1 view

ros python creating strange side effects

Ubuntu 16.04 ROS Kinetic I have been working on a program in python. Created my package just like I always do. This time I thought I would give dynamic reconfigure a try. I did the tutorial and ran ...
user avatar
0 votes
1 answer
132 views

Python OpenCV namedWindow and imshow freeze

Hi there, I try to view a subscribed image via cv2.imshow() like the following: ...
user avatar
1 vote
1 answer
43 views

is rospy.Publisher.publish() thread safe?

Want to publish() in main and also in child thread on one rospy.Publisher(),is this safe? Originally posted by dyan on ROS Answers with karma: 7 on 2017-03-17 Post score: 0
user avatar
0 votes
1 answer
19 views

how to close subscriber

After rospy.Subscriber(),after a period of time or after an event this may no longer need,how to close this subscriber Originally posted by dyan on ROS Answers with karma: 7 on 2017-03-16 Post score: ...
user avatar
0 votes
1 answer
7 views

catkin rospy package structure

Hi have been writing a ros python package with the following structure (I checked my structure against moveit_commander). ...
user avatar
0 votes
3 answers
86 views

How to obtain list of all available topics [python]

In my gazebo model I have 9 differential drive vehicles. When I execute rostopic list i get ...
user avatar
0 votes
1 answer
7 views

Controlling each UAV separately in a UCTF project

I have a multiple UAV launched in Gazebo world using the UCTF project which launch two groups of gold and blue colors which compete against each other in a game cube and grass pitch in the Gazebo ...
user avatar
0 votes
1 answer
11 views

How to process PointCloud2 message data in python?

I am trying to save a pointcloud data using python. Bu I haven't been able to import pcl. I am no sure if my installation in correct as I keep getting this error : ...
user avatar
0 votes
1 answer
9 views

subscriber cannot receive topic on rospy

I made a node which has 1 action client, 5 subscribers and 1 publisher. I wrote its pseudo code is following. When I tried a certain sequence, one of the subscribers sub1 did not call its callback cb1 ...
user avatar
0 votes
1 answer
41 views

Interrupting rospy.spin() or writing a custom loop that does the equivalent

Hi, Is there a way to exit the rospy.spin() loop without completely shutting down the node? Or possibly is there a way to write my own equivalent rospy.spin() loop which answers service calls ...
user avatar
0 votes
2 answers
3 views

import tf2/StaticTransformPublisher in Python

I'm following this tutorial[1] and having trouble with importing. [1] http://wiki.ros.org/tf2/Tutorials/Writing%20a%20tf2%20static%20broadcaster%20(Python) ...
DLu's user avatar
  • 4,294
0 votes
1 answer
29 views

How does rospy.Timer behave if it triggers while the previous callback is still busy?

I'm using a rospy.Timer (periodic, not one-shot) to handle a long-running process in a non-blocking way. I only want one instance of the process to be running at ...
user avatar
0 votes
1 answer
44 views

speed up RViz/MoveIt

I am working with a KaWaDa nextage robot using rtmros_nextage and Moveit via the moveit_commander python interface like this: ...
user avatar
0 votes
1 answer
14 views

Best way to get FK for many different joint-states

Hello! I am trying to calculate the end-effector pose for a huge amount of different JointStates. The two ingredients to do that are my URDF and the numpy array that contains the joint angles. I am ...
user avatar
0 votes
1 answer
14 views

rostest fails when run using "catkin_make run_tests"

Hi all, I have a node and some_test.test file like this: ...
user avatar
0 votes
1 answer
24 views

image_transport republish One Time Use

Folks, I have several rosbags, 8 seconds long each, which only contain compressed depth images. Since rospy does not support compressedDepth (as far as I know) I am using ...
user avatar
0 votes
1 answer
1 view

how to open/close nextage grippers in simulation

I am using rtmros_nextage in simulation and would like the robot to pick up objects. So far I cannot even open or close the grippers. Minimal example that does not do anything: rtmlaunch ...
user avatar
0 votes
1 answer
2 views

running rosmsg show from code

Hi, is there a way (possibly in Python) to call the command line command rosmsg show from code, passing as an argument the name of the message/service and getting ...
user avatar
0 votes
1 answer
62 views

What should be the messageType for a custom message?

HI, I created a custom ROS message: string message int32 a int32 b I will need to publish the messages from the web browser (roslibjs) and show it on the terminal, ...
user avatar
0 votes
1 answer
27 views

Delay incoming messages

Is there a way in Rospy to delay incoming messages? Specifically, I wish to delay incoming velocity commands for teleop. I can't use a sleep because I still need my program/node to run other processes....
user avatar
0 votes
1 answer
13 views

Pass parameters to a service handler in rospy

In rospy, message callbacks can have additional parameters, which allows me to write only one callback for different subscribers. For example: ...
user avatar
0 votes
1 answer
7 views

delete TransformListener object in python to release computational resource

Hello! Recently I notice that, after I create a TransformListener object in a class in python, e.g.: self.tf = TransformListener(), the created tf object gets stuck in the memory, even I try deleting ...
user avatar
0 votes
1 answer
69 views

Calculating Mass Inertia Matrix in Joint Space

Hi, I am doing simulation of Baxter Robot. Hence I need to calculate Mass Inertia Matrix in Joint Space. I have Baxter URDF files. I see here that Mass Inertia Matrix in Joint Space is defined in ...
ravi's user avatar
  • 1,421
0 votes
2 answers
23 views

Using MoveIt programmatically and integrating with ros_control

I have a question about using moveit for my custom 6 dof manipulator robot. I am pretty new to ROS, and I really hope to learn from the community. Basically I want to go from a URDF file to actually ...
user avatar
0 votes
1 answer
11 views

Issues with header seq value (first value in rospy is 1, first value in roscpp is 0, access from roscpp)

I was planning to use Header seq value to verify that communication in my system of ROS-nodes (using ROS Indigo) is synchronized, however, I discovered a couple issues with that value. If that's a bug,...
user avatar
0 votes
1 answer
61 views

How to call a rosservice within a python code?

I am trying to write a code in python where I want to be able to run a node or a launch file, and do a rosservice call with an argument. I am trying to find some examples , please kindly guide me if ...
user avatar
0 votes
1 answer
7 views

Access AR.Drone camera with OpenCV while connected to ROS

Hi, I am having an issue where by I am unable to connect to the AR Drone camera when the drone is connected through ROS using the ardrone_autonomy ardrone.launch. I think the issue is due to the fact ...
user avatar
0 votes
1 answer
56 views

DC MOTOR + ENCODER + PYTHON

Hello, everyone. I have the next equipment: https://www.pololu.com/product/2598 , https://www.pololu.com/product/2208 and raspberry pi. I want to control the dc motors via ROS and Python. Is it ...
user avatar
0 votes
1 answer
4 views

Transform geometry_msgs/TransformedStamped() to sensor_msgs/PointCloud2 on rospy

Hi people, I have a geometry_msgs/TransformedStamped() vector which I am trying to translate to sensor_msgs/PointCloud2. I have looked aroun in the rospy api docs but nothing clear comes out strking. ...
user avatar
0 votes
1 answer
6 views

Callback function not updating values (Rospy)

I have a program used to read in command velocities from two sources (teleop/navigation), blend them, and then publish the blended velocity to the Turtlebot. While debugging, I noticed that the code ...
user avatar
0 votes
1 answer
1 view

How do you modify the velocity multiplexer for turtlebot?

I have a Kobuki Turtlebot and would like to publish to the multiplexer on my own topic. The official documentation hasn't done me well explaining how to modify the parameters. Where can I find the ...
user avatar
0 votes
2 answers
8 views

tf::TransformListener gets wrong tf

Hello, TL;DR tf::TransformListener gets a different transform than shown in RVIZ I am having quite a strange problem. I am using a rosbag file to playback recorded data and I am adding new transforms ...
user avatar
0 votes
1 answer
33 views

Getting 'rosgraph resource not found' when trying to get turtlebot local_plan?

Hi, I'm trying to get the 'geometry_msgs/Poses' message from the '/move_base/DWAPlannerROS/local_plan' topic for the Kobuki ...
user avatar
0 votes
1 answer
4 views

Can't import rospy

Hello, I have a ROS aplication in Python and Qt, and when I run it from the terminal all is ok, but I try to run with double click (the script with the permissions and Nautilus configuration ...
user avatar
0 votes
1 answer
5 views

How to programmatically attach link to a model during simulation?

Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7 I have non-colliding URDF models to be used as markers in Gazebo. The markers will be attached to objects to be grasped, and their positions ...
user avatar
0 votes
1 answer
5 views

Deleting Gazebo model causes Python to freeze

Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7 Whenever I call the Gazebo model deletion service, Python freezes. No errors or special messages appear when the deletion code runs. This ...
user avatar
0 votes
3 answers
277 views

point_cloud2.read_points and then?

I have a topic publishing a point cloud of type sensors_msgs.PointCloud2. I can subscribe to it and read it using ...
user avatar
0 votes
3 answers
288 views

tf.LookupException: "base_link" passed to lookupTransform argument target_frame does not exist

Hello together, I am new with ros tf's and already worked myself threw the tf tutorials. (I am using ros indigo) As my first test with tf's after the tutorial I wrote 2 small nodes. The first one is ...
user avatar
0 votes
1 answer
6 views

Waiting for "gazebo_msgs/GetLinkState" causes Python to freeze

ROS Indigo on Ubuntu 14.04 with Gazebo 7.3.0 and Python 2.7: I have an issue withs starting a Gazebo service proxy for getting link states programmatically from a Python file I run after running the ...
user avatar
0 votes
1 answer
33 views

Python Import not being recognized

Hi guys, I'm currently working through a textbook call Programming Robots with ROS. There is a chapter that goes over a simple movement code for a turtlebot simulator. The code is pasted below. ...
user avatar
0 votes
1 answer
9 views

How to convert slot_types of messages to actual data types

Hi All, I am currently implementing a little python script that takes parameters for actions from a string and automatically populates an action goal to send it to the action server. The goal ...
user avatar
1 vote
2 answers
275 views

How do you implement a rospy KeyboardInterrupt without killing the node?

I want to run a process in a while loop that prints to screen, and exit the while loop by pressing a key or 'Ctrl+C'. But I don't want the same key press to also kill the ros node - I just want to ...
user avatar
0 votes
1 answer
11 views

How do you change a rosservice parameter in python?

I'm using the robot_localization package, specifically the ekf_localization and ...
user avatar
0 votes
1 answer
165 views

How to exit a ROS node on keyboard interrupt?

How do you write a Python ROS node so that it exits in response to a KeyboardInterrupt exception? I have a trivial node like: ...
user avatar
0 votes
1 answer
54 views

How to write to a text file in python in a ROS node?

I need to record a topic message called "message" only when a "message sent" button is pressed. I have made a separate node for GUI that has "message sent" button. I ...
user avatar
0 votes
2 answers
18 views

Unable to read a file while using relative path

Hi, I want to read a file inside python script in ros indigo in the following way - file_name = rospy.get_param("~file", None) Below is the snippet of ...
ravi's user avatar
  • 1,421

1
3 4
5
6 7
10