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

robzz's profile - activity

2021-11-11 10:04:13 -0500 received badge  Enlightened (source)
2021-11-11 10:04:13 -0500 received badge  Guru (source)
2020-07-30 13:19:03 -0500 received badge  Nice Question (source)
2018-08-10 04:55:53 -0500 received badge  Great Answer (source)
2017-10-23 03:59:01 -0500 received badge  Great Question (source)
2017-05-10 08:21:26 -0500 received badge  Good Answer (source)
2017-01-05 17:51:08 -0500 received badge  Nice Question (source)
2015-09-06 15:12:17 -0500 received badge  Favorite Question (source)
2015-09-06 15:12:11 -0500 received badge  Nice Answer (source)
2015-06-23 05:38:24 -0500 received badge  Good Question (source)
2015-06-01 05:45:19 -0500 received badge  Self-Learner (source)
2015-06-01 05:45:19 -0500 received badge  Teacher (source)
2015-06-01 05:44:38 -0500 received badge  Nice Question (source)
2015-03-13 11:13:39 -0500 received badge  Famous Question (source)
2015-01-26 10:52:21 -0500 received badge  Famous Question (source)
2014-11-09 06:38:32 -0500 received badge  Notable Question (source)
2014-10-28 20:31:27 -0500 received badge  Popular Question (source)
2014-10-28 19:58:25 -0500 commented answer How to rotate vector by quaternion in python

Or, point me to the location in that 1700 line file that you're referring to :)

2014-10-28 19:38:24 -0500 commented answer How to rotate vector by quaternion in python

@RickArmstrong Hm I don't see any comments about rotating a vector by a quaternion there. I posted an answer here with some code that seems to work for the few cases that I've tried, using some of those functions. Would you mind taking a look?

2014-10-28 19:31:00 -0500 answered a question How to rotate vector by quaternion in python

Okay, based on @tfoote's response and this answer to a related question, I think this does the job:

# rotate vector v1 by quaternion q1 
def qv_mult(q1, v1):
    # comment this out if v1 doesn't need to be a unit vector
    v1 = tf.transformations.unit_vector(v1)
    q2 = list(v1)
    q2.append(0.0)
    return tf.transformations.quaternion_multiply(
        tf.transformations.quaternion_multiply(q1, q2), 
        tf.transformations.quaternion_conjugate(q1)
    )[:3]
2014-10-28 18:48:59 -0500 commented answer How to rotate vector by quaternion in python

Do I need to do matrix multiplications outside of those functions to accomplish this? If so, which? Better yet: where can I find examples of doing this? I've been search online for such an example using python tf, but with no luck.

2014-10-28 18:43:41 -0500 commented answer How to rotate vector by quaternion in python

Right, so which of those transformation rotates a vector by a quaternion, if any?

2014-10-28 18:43:11 -0500 answered a question How to rotate vector by quaternion in python

Right, so which of those transformation rotates a vector by a quaternion, if any?

2014-10-28 17:58:31 -0500 asked a question How to rotate vector by quaternion in python

What is the python tf API to rotate a vector by a quaternion to get another vector?

2014-10-03 15:30:49 -0500 received badge  Notable Question (source)
2014-08-05 04:46:37 -0500 received badge  Famous Question (source)
2014-07-14 02:58:49 -0500 received badge  Popular Question (source)
2014-06-03 09:43:57 -0500 received badge  Famous Question (source)
2014-05-25 23:25:56 -0500 received badge  Notable Question (source)
2014-05-24 10:22:48 -0500 received badge  Popular Question (source)
2014-05-23 14:04:21 -0500 asked a question Does the navigation stack require a map

I would like to mess around with the ROS navigation stack with a custom robot that I've built. I'm trying to figure out if it can be used to navigate in a previously unknown environment. The tutorial for setting up a robot to use the nav stack states that a map is not required. But this page on map building says that it does requires a static map. Aren't these statements contradictory? Which is true?

2014-05-22 15:22:36 -0500 asked a question Problem with the "Simulating the 2dnav Stack" tutorial

I am trying to play with the ROS navigation stack, eventually to use on a differential drive robot that I have built. I starting following this tutorial: http://wiki.ros.org/pr2_2dnav_gazebo/...

But I've run into a few issues.

1) It seems that there is some discontinuity bewteen the code downloaded at https://code.ros.org/svn/wg-ros-pkg/s... and the packages in ros-groovy-pr2, which I installed with apt-get. Both pr2-armless-wg-fake_localization.launch and pr2-wg-amcl.launch expected launch files in pr2 packages not to be in designated "launch" folders, but they were. I fixed this easily, but I thought it would be relevant to note.

2) I see the following error message when launching either pr2-armless-wg-fake_localization.launch or pr2-wg-amcl.launch

Warning [parser.cc:361] Converting a deprecated SDF source[data-string].
Set SDF value
  Version[1.0] to Version[1.3]
  Please use the gzsdf tool to update your SDF files.
    $ gzsdf convert [sdf_file]
Error [parser.cc:712] XML Element[filename], child of element[heightmap] not defined in SDF. Ignoring.[heightmap]
Error [parser.cc:703] Error reading element <heightmap>
Error [parser.cc:703] Error reading element <geometry>
Error [parser.cc:703] Error reading element <collision>
Error [parser.cc:703] Error reading element <link>
Error [parser.cc:703] Error reading element <model>
Error [parser.cc:369] Unable to read element <sdf>
Error:   Could not find the 'robot' element in the xml file
         at line 59 in /tmp/buildd/ros-groovy-urdfdom-0.2.8-2precise-20140305-0755/urdf_parser/src/model.cpp
Error [parser_urdf.cc:1814] Unable to call parseURDF on robot model
Error [parser.cc:319] parse as old urdf model file failed.
Error [World.cc:1440] Unable to read sdf string[<gazebo version="1.0"><model static="true" name="wg_walls"><link name="link"><origin pose="-25.65 -25.65 0.0 0.0 0.0 0.0" /><collision name="collision"><geometry><heightmap filename="willow_walls_heightmap.png" size="51.3 51.3 1" origin="0 0 0" /></geometry></collision><visual name="visual"><geometry><heightmap filename="willow_walls_heightmap.png" size="51.3 51.3 1" origin="0 0 0"><texture><diffuse>dirt_diffusespecular.png</diffuse><normal>dirt_normal.png</normal><size>50</size></texture><texture><diffuse>grass_diffusespecular.png</diffuse><normal>grass_normal.png</normal><size>20</size></texture><texture><diffuse>fungus_diffusespecular.png</diffuse><normal>fungus_normal.png</normal><size>80</size></texture><blend><min_height>2</min_height><fade_dist>5</fade_dist></blend><blend><min_height>4</min_height><fade_dist>5</fade_dist></blend></heightmap></geometry></visual></link><origin pose="-25.65 -25.65 0 0 -0 0" /></model></gazebo>]

From this question, it looks like I need to convert some SDF file to a more recent version. In that question, there was a useful filename where I only get [data-string]. I've searched through the pr2 and gazebo packages for text that matched that xml with no luck. I have a feeling the xml is being generated every time I launch... Does anyone have any pointers for this?

3) When I run either pr2-armless-wg-fake_localization.launch or pr2-wg-amcl.launch I see constant stream of log messages describing attempts to restart map-server ... (more)

2014-04-20 14:08:46 -0500 marked best answer calibrating webcam

I'm trying to calibrate my webcam to remove distortions. I run

$ rosrun usb_cam usb_cam_node

Then this error and warning message is printed out:

[ERROR] [1384614141.059240716]: Unable to open camera calibration file [/home/robz/.ros/camera_info/head_camera.yaml]
[ WARN] [1384614141.060021982]: Camera calibration file /home/robz/.ros/camera_info/head_camera.yaml not found.

Not sure what that means. I wouldn't expect a calibration file to exist for a camera that I haven't been able to calibrate yet...

In any case, the node is still able to run despite the error and warning message. It publishes to a topic, and I can see it with image_view just fine. So then I run

$ ROS_NAMESPACE=usb_cam rosrun image_proc image_proc

Then, this error message is printed out:

[ERROR] [1384614331.794465524]: Rectified topic '/usb_cam/image_rect_color' requested but camera publishing '/usb_cam/camera_info' is uncalibrated

This is very confusing for me. I was under the impression that the image_proc node does the calibration. Why does it require a calibrated camera in order to run?

2014-04-20 13:46:46 -0500 marked best answer how to plot one topic against another in ros

I have two topics publishing the std_msgs/Float32 message. Is there a way I can plot the data in one topic against the other?

2014-04-20 13:44:53 -0500 marked best answer Collecting data from multiple topics

I'm designing a node in my system that needs to gather data from two topics (A and B), process it, and publish the results to another topic. I've considered a few implementation alternatives considering migrating to services, using fixed-rate loops, and retaining the data that a topic handler last received. Here are a few alternatives:

  1. Create a handler for each topic. In a loop running at a fixed rate, publish the results using the data that was last received for each topic.
  2. Create a handler for each topic. In handler A, publish results using the data from received in that handler with the data that was last received from handler B.
  3. Migrate topic A to be a getter service instead. In the handler for topic B, publish results using the data received in that handler and the data received from a call to the new service.

Which method is best? Is there a better way to do this?

2014-04-20 13:34:40 -0500 marked best answer sensor_msgs/Image data value is a string?

I've written a node in python to read a binary image (of type sensor_msgs/Image) being published on a topic. I got confused when trying to access the data in the callback.

print img

produces

header: 
  seq: 35232
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: ''
height: 40
width: 127
encoding: 8UC3
is_bigendian: 0
step: 381
data: [0, 0, 0, 0, ...]

I shortened the data array with an ellipsis.

What's weird are the types of the data.

print type(img.data), type(img.data[0])

produces

<type 'str'> <type 'str'>

When I try to display the data with "print img.data" I get a bunch of junk characters. When I try to index into the first element, I get an empty string.

This confuses me because the description of the topic type Image specifies that the img.data field is an array of bytes. Why am I seeing a string here?

2014-04-20 13:14:39 -0500 marked best answer Should I use a lock on resources in a listener node with multiple callbacks?

If I have a node which listens to multiple topics & has a callback for each topic, should I need locks/mutexes on the resources that are changed by more than one callback? My question stems from whether or not callback functions are executed in new threads--could code be concurrently executing in two different callback functions at once?

2014-04-20 13:11:31 -0500 marked best answer streaming video from a ros topic to a client browser

I want to stream live data from my robot to the internet.

Right now I have a ROS node communicating with a webcam and publishing Image/CompressedImage data. The robot needs this data to follow lines/recognize obstacles. I'm trying to figure out how to have the data be sent to show up in a browser in realtime video. I'm not sure on the best way to go about this.

I could have the computer running ROS also be running a server, copying jpeg/png CompressedImage data to a file, then have a client connect to that server to periodically poll for the image and update its page to simulate video..

Is there a more common/better approach?