ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

narcispr's profile - activity

2023-02-28 07:38:40 -0500 received badge  Nice Question (source)
2022-06-29 08:35:08 -0500 received badge  Great Question (source)
2020-09-01 05:59:38 -0500 answered a question Denavit-Hartenberg (DH) to URDF/SDF or /tf /tf2?

The following example shows how to define a revolute DoF defined using the Denavit-Hartenberg parameters (theta, d, a an

2019-08-27 15:49:36 -0500 received badge  Famous Question (source)
2018-10-30 20:35:00 -0500 received badge  Nice Question (source)
2016-10-06 11:20:24 -0500 received badge  Nice Question (source)
2016-09-29 22:52:28 -0500 received badge  Famous Question (source)
2016-09-29 22:52:28 -0500 received badge  Notable Question (source)
2016-05-04 06:03:43 -0500 received badge  Popular Question (source)
2016-03-11 02:38:45 -0500 received badge  Enthusiast
2016-03-09 10:15:11 -0500 asked a question mapviz and tile_map

Hi, I've tried mapviz in Jade. I'm able to plot odometries, paths, tfs, ... However, when I try to connect to a tile_map I don't see nothing. I've an static_transform_publisher publishing a TF between my world origin frame to wgs84 like this one:

rosrun tf static_transform_publisher 5129803 337872 0 0 0 0 /wgs84 /rviz 100

No MapQuest neither Stamen images are received.

Someone can point me to a tutorial or explain me what am I doing wrong?

Thank you!

2016-02-11 07:53:56 -0500 received badge  Great Answer (source)
2015-08-07 13:36:13 -0500 received badge  Notable Question (source)
2015-08-07 13:36:13 -0500 received badge  Popular Question (source)
2015-07-29 11:00:04 -0500 received badge  Notable Question (source)
2015-07-29 11:00:04 -0500 received badge  Famous Question (source)
2015-05-28 19:14:39 -0500 received badge  Nice Question (source)
2015-04-15 03:16:50 -0500 received badge  Good Answer (source)
2015-03-17 07:34:13 -0500 commented answer rosbridge 2.0 limit bandwith

topic_tools throttle works fine. However, it is a pity that I've to republish all the topics that I want to include in my interface (this means one extra node for each topic). Thanks!

2015-03-17 07:25:24 -0500 commented answer rosbridge 2.0 limit bandwith

I've changed the default throttle_rate from 0 to 200 and now messages are displayed much slower. However, I think that the data transmitted between the robot and the website is still the same. Is there any other "throttle_rate" like param for the rosbridge webserver?

2015-03-14 03:38:43 -0500 received badge  Popular Question (source)
2015-03-13 06:25:42 -0500 asked a question rosbridge 2.0 limit bandwith

Hi, I'm using rosbridge to have a web-based user interface with my robot. As some of the message I want to check are published quite fast, the amount of CPU and bandwith required is high. There is any option to limit the bandwith or the refresh rate? I'll be happy receiving only one every four messages or something similar.

I'm using ROS hydro and Ubuntu 12.04.

Thank you!

2014-11-21 05:22:14 -0500 commented question Multiple nodes subscribed to a topic make the topic slower

After more trials I've measured that the callback function takes around 0.2s with the publisher queue=1 (asynchronous). However, if I remove the queue, making the node synchronous, the function only takes 0.005s and publishes at 30Hz as desired! Are not asynchronous nodes better than synchronous?

2014-11-21 04:54:39 -0500 asked a question Multiple nodes subscribed to a topic make the topic slower

Hi, I have a python node that is subscribed to an Odometry msg (queue = 1). In the subscription callback, this node only fills another message (custom Odometry msg) and publishes it (queue = 1). There are 8 nodes, in the same computer, subscribed to this new topic (all of them with queue = 1). Despite the original Odometry msg is published at 30Hz (checked using rostopic hz command) the custom odometry message is only published at 5-6Hz. However, every time that I kill one of the nodes subscribed to this custom odometry msg the publish rate increases. It seems like when there are to many nodes subscribed to a topic they make the topic publication slower loosing lots of messages. Have any one faced before this problem? Am I doing something wrong with the queues?

Thank you!

2014-03-03 22:51:52 -0500 received badge  Nice Answer (source)
2014-01-28 17:29:16 -0500 marked best answer Define a topic for a Plot in a rqt_gui perspective

I've created a perspective in rqt_gui with several Plot plugins. However, each time I open the perspective, all the Plot plugins appear in its correct position but the topic they have to plot is not stored. There is a way to set the topics and avoid to define them every time?

Thank you!

2014-01-28 17:27:55 -0500 marked best answer Losing TFs

Here is my problem with TFs:

  • I have a node publishing a topic and its related TF:

    pose_tf = tf.TransformBroadcaster()
    o = tf.transformations.quaternion_from_euler(roll, pitch, yaw, 'sxyz')
    pose_tf.sendTransform((pose_x, pose_y, pose_z), o, topic.header.stamp, topic.header.frame_id, main_frame)
    self.pub.publish(topic)

  • From another node, I subscribe to this topic using

    rospy.Subscriber("/topic_name", TopicType, self.function)

  • Each time this node receives a /topic_name, function self.function is executed. To obtain the TF relating the main_frame and the topic_frame I use:

try:
    (trans, rot) = self.listener.lookupTransform( main_frame, topic.header.frame_id, topic.header.stamp)
except (tf.LookupException, tf.ConnectivityException, tf.ExtrapolationException):
    rospy.logerr('Define TF for the topic!)

  • For the first messages the lookupTransform function always generates an exception. After 1 second it starts working properly. I've tried adding a waitForTransform but I've the same problem.

self.listener.waitForTransform(main_frame, topic.header.frame_id, rospy.Time(), rospy.Duration(4.0))

Is it correct to put in the lookupTransform the time topic.header.stamp instead of rospy.Time(0)? (I d'ont want the last TF but the one published in this moment). Am I using function waitForTransform correctly? Any idea?

I'm using Ubuntu 12.04 and ros fuerte. Thank you!

UPDATE: If I add the waitForTransform call inside the try-exception block I can see the following (where line 277 corresponds to self.listener.waitForTransform(main_frame, topic.header.frame_id, rospy.Time(), rospy.Duration(1.0))):

bad callback: <bound method="" poseekfslam.landmarkupdate="" of="" <__main__.poseekfslam="" instance="" at="" 0xab3f6cc="">> Traceback (most recent call last): File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/topics.py", line 678, in _invoke_callback cb(msg) File "/home/narcis/workspace/cola2/pose_ekf_slam/src/pose_ekf_slam.py", line 277, in landmarkUpdate rospy.Duration(1.0)) Exception

Seems that waitForTransform or maybe rospy.Duration(1.0) are generating and exception.

2014-01-28 17:26:22 -0500 marked best answer pylint & pychecker

Have you tried to use pylint or pychecker to improve/check your python code? I've tried with pylint but it can't import rospy and srv or msg packages:

No config file found, using default configuration
F: 6: Unable to import 'rospy'
F: 8: Unable to import 'my_package.srv'
F: 9: Unable to import 'my_package.msg'
F: 10: Unable to import 'std_srvs.srv'
F: 11: Unable to import 'std_msgs.msg'
...

With PyChecker I've a similar problem:

Processing module my_node (my_node.py)...
ImportError: No module named srv

Warnings...

my_node:1: NOT PROCESSED UNABLE TO IMPORT

Any idea? I found this ticket related with this topic, but it was not very useful for me. Thank you!

2014-01-28 17:26:21 -0500 marked best answer python deep copy of ROS message

I want to publish two odometry messages that share most of the fields. To avoid copying all the elements one by one I try:

odom_new = Odometry(odom_old)

But this give me an error.

File "/opt/ros/electric/ros/core/roslib/src/roslib/message.py", line 362, in __init__ raise TypeError("Invalid number of arguments, args should be %s"%str(self.__slots__)+" args are"+str(args)) TypeError: Invalid number of arguments, args should be ['header', 'child_frame_id', 'pose', 'twist']

Then I try:

odom_new = Odometry(odom_old.header, odom_old.child_frame_id, odom_old.pose, odom_old.twist)

This doesn't give me any errors but just creates a pointer from the new object to the old one. Then, when the new one is modified the old one too (I need an independent object)

After this I try:

import copy

odom_new = copy.deepcopy(odom_old)

But again this solution fails.

odom_new = copy.deepcopy(odom_old) AttributeError: 'function' object has no attribute 'deepcopy'

Any Idea about how to create a deep copy of a ROS message in Python? Sorry, my Python knowledge is very limited :P!

2014-01-28 17:26:10 -0500 marked best answer Rosparam dump from launch file

Hi, I'm trying to record all the parameters I'm using each time I execute a launch file. I've added the following line at the end of my launch file:

<rosparam command="dump" file="parameters_dump.yaml"/>

However, the only thing this file contains is:

roslaunch: uris: {host_my_name_mbp__45687: 'http://my_name-mbp:45687/'} run_id: 9a82c640-b958-11e1-a381-3c0754675d16

It seems like if the dump command is done before all the parameters are loaded in the param server. Any idea?

Thank you!

P.S. If I do a: $ rosparam dump parameters_dump.yam

from the command line once the vehicle has started, it works.

2014-01-28 17:23:30 -0500 marked best answer param server C++ lists

I'm defining config vectors through the param server using yaml files:

sample: velocity_controller/velocity_max: [0.3, 0.2, 0.2, 0.0, 0.0, 0.5]

If I want to parse these vectors from a python node I use this code:

_velocity_max = array( rospy.get_param("velocity_controller/velocity_max") )

However, in C++, using the ros::param::getCached() I'm only able to parse the following types: string, int, double, bool or XmlRpcValue.

How I can import my values into a std::vector<double> ?

Thank you!