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

DamienJadeDuff's profile - activity

2019-11-20 13:21:32 -0500 received badge  Guru (source)
2019-11-20 13:21:32 -0500 received badge  Great Answer (source)
2019-08-24 10:34:08 -0500 commented answer Failed to rosrun static tf publisher

@Jägermeister https://wiki.ros.org/tf#static_transform_publisher base_link and map are common TF frames.

2019-08-24 10:29:48 -0500 commented answer CatkinMake Error in DS325 "depth camera"

I deleted that file which I just put to share for a project - I don't think the creator would be happy with my hosting i

2019-07-15 03:40:16 -0500 received badge  Guru (source)
2019-07-15 03:40:16 -0500 received badge  Great Answer (source)
2018-04-11 04:24:59 -0500 received badge  Nice Answer (source)
2016-12-21 01:41:52 -0500 commented answer Bump Sensors on Simulated TurtletBot in kinetic
2016-12-21 01:41:05 -0500 commented answer Bump Sensors on Simulated TurtletBot in kinetic
2016-12-21 01:21:51 -0500 answered a question Bump Sensors on Simulated TurtletBot in kinetic

I have the same problem. I cannot seem to get anything published on the bumper topic (ROS Kinetic @ 16.04, everything from packages) I have given up for now but if you are interested in pursuing this further, here is some information.

2014-04-25 03:42:43 -0500 received badge  Enthusiast
2014-04-17 19:56:30 -0500 commented answer how can I "shell programming" in launch file?

Fixed the answer, thanks felix k. My answer is not a good one anyway. ;)

2014-04-17 19:55:58 -0500 edited answer how can I "shell programming" in launch file?

Put these commands into an executable shell script (let's call it yourscript.sh) somewhere inside the package directory (let's call the package yourpackage) and then reference that script inside your launch file (e.g. example.launch):

<node name="nodename" pkg="yourpackage" type="yourscript.sh">
2014-04-02 04:01:37 -0500 received badge  Critic (source)
2014-03-04 00:47:09 -0500 edited answer Failed to rosrun static tf publisher

Can you please provide the command that you used to get this output? Did you give ALL the values required on the command line?

There should be 7 numbers then 2 strings then 1 more number. e.g.

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 1.0 base_link map 1000

OR 6 numbers then 2 strings then 1 more number. e.g.

rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 base_link map 1000

(incorporating the suggestion from jarvisschultz).

2014-02-21 05:02:22 -0500 received badge  Good Answer (source)
2013-10-07 00:51:29 -0500 answered a question how to get value of depth image from *.bag file

A great place to start is: this question

If the tutorial linked there is insufficient for your needs, the bag_to_video code linked to there should give you the appropriate template for creating a tool to suit you.

Edit

Actually more informative code can be found here. See in particular the lines opening the bag and looping over its messages:

00068         // Load input bag file
00069         rosbag::Bag bag;
00070     bag.open(bag_in_name, rosbag::bagmode::Read);
00071         ROS_INFO("Opened %s", bag_in_name.c_str());
00072 
00073         // Create output bag file
00074         rosbag::Bag bag_out;
00075     bag_out.open(bag_out_name, rosbag::bagmode::Write);
00076         ROS_INFO("Created %s", bag_out_name.c_str());
00077 
00078         // Get topics
00079     rosbag::View view(bag);
00080 
00081         // Loop over messages
00082         BOOST_FOREACH(rosbag::MessageInstance const m, view) {
00083 
00084                 // Get data
00085         sensor_msgs::ImageConstPtr image_msg = m.instantiate<sensor_msgs::Image>();

The part converting this to an OpenCV image:

00091         if (image_msg != NULL) {
00092 
00093             cv::Mat image;
00094 
00095             if (image_msg->encoding == "32FC1") { // depth image
00096                 cv_bridge::CvImagePtr depth_image_ptr;
00097                 try {
00098                     depth_image_ptr = cv_bridge::toCvCopy(image_msg);
00099                 } catch (cv_bridge::Exception& e) {
00100                     ROS_ERROR("cv_bridge exception: %s", e.what());
00101                 }

And the part reading the pixels off this image:

    00105                 for(int y = 0; y < depth_image_ptr->image.rows; y++) {
    00106                     for(int x = 0; x < depth_image_ptr->image.cols; x++) {
    00107                         float distance = depth_image_ptr->image.at<float>(y, x);
2013-10-03 22:35:00 -0500 commented question how to achieve message polymorphism in ROS?

Without knowing the exact criteria, this may be of interest: http://wiki.ros.org/topic_tools/mux

2013-10-03 19:34:15 -0500 commented question how to achieve message polymorphism in ROS?

I wonder if you could further elucidate why you want this to help potential answerers? I should have thought using multiple message types would've had the same effect? Any particular reason you want them published/called over 1 topic? Good luck.

2013-10-02 02:59:07 -0500 commented answer Error static transform publisher

Check that this works by calling `rosrun tf view_frames` in another terminal and look at the PDF file. There should be a link between base_link and base_scan. This way you wouldn't need to fix the launch file problem (though you should probably do that too).

2013-10-02 02:58:23 -0500 commented answer Error static transform publisher

If you just want to get the transform in the launch file running, then running the rosrun command like this would be enough: `rosrun tf static_transform_publisher 1 0 0 0 0 0 base_link base_scan 100`.

2013-10-02 02:57:14 -0500 commented question Error static transform publisher

Perhaps you can for now just continue to use the rosrun command to run the static_transform_publisher and remove that part of the roslaunch file? As the `<node pkg="tf..../&gt;` part of the launch file and the 1rosrun tf static_transform_pub...` do the same thing.&lt;/p&gt;">

2013-10-02 02:55:56 -0500 commented question Error static transform publisher

To be clear, we seem to have established that rospack, rosrun both find tf and static_transform_publisher is in the right place. It seems to have the right permissions. It is a bit of a mystery why it is not working in your launch file as the launch file seems right.

2013-10-02 02:51:51 -0500 commented question Failed to rosrun static tf publisher

The comment in the other question was asking you to try running static_transform_publisher using rosrun to see if that works. Accordingly we can discover the cause of the problem. Apparently it works. The intention was never to run it together with the roslaunch.

2013-09-30 02:36:14 -0500 commented question ros commands are not running

I'm a bit lost with this one but why don't you try running the Python debugger on these scripts as they are all in Python (at the first debugger prompt, type continue and then when you press CTRL-C you will drop into the debugger): python -m pdb `which roscore`

2013-09-29 23:38:01 -0500 commented answer joint orientation (rotation)

Note that fixed axis rotation can mean in general about any axis, but in the ROS documentation I linked to it is referring to 3 rotations around fixed axes x y and z ('sxyz' in transformations.py). This should be the same as 'rzyx' in transformations.py).

2013-09-29 23:32:13 -0500 commented answer joint orientation (rotation)

Arno, I am unsure what you mean by independent. You should see that `m=transformations.euler_matrix(0,math.pi,math.pi,'sxyz')` is the same as `m2=transformations.euler_matrix(math.pi,0,0,'sxyz')` for example (try `m2[numpy.abs(m2)<0.001]=0` and `m[numpy.abs(m)<0.001]=0` to clean them up).

2013-09-29 20:22:00 -0500 received badge  Necromancer (source)
2013-09-29 05:13:05 -0500 received badge  Good Answer (source)
2013-09-29 05:13:05 -0500 received badge  Enlightened (source)
2013-09-29 02:37:47 -0500 received badge  Nice Answer (source)
2013-09-28 23:27:24 -0500 answered a question joint orientation (rotation)

Is your documentation using a fixed axis or rotating axis (extrinsic or intrinsic rotation?)

The URDF documentation is using a fixed axis rotation. This is described in more detail here: REP 103

Also, here: Rotation Methods (ROS)

If your documentation is using rotating axis (intrinsic rotation) there is no problem as ypr on a rotating axis is same as rpy on a fixed axis.

Otherwise:

The easiest way might to convert rotations between Euler angles is to use an intermediate representation like a quaternion.

In ROS if you are using Python, you can use the transformations.py module mentioned here (with a link to the full source): transformations.py

Example Python session using this (first way is with quaternions, second with matrices):

$ python
Python 2.7.3 (default, Jul  5 2013, 08:52:38) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import transformations
>>> import math
>>> q=transformations.quaternion_from_euler(math.pi,0,0,'szyx')
>>> q
array([  0.00000000e+00,  -0.00000000e+00,   1.00000000e+00,
        6.12303177e-17])
>>> transformations.euler_from_quaternion(q,'sxyz')
(0.0, -0.0, 3.141592653589793)
>>> m=transformations.euler_matrix(math.pi,0,0,'szyx')
>>> m
array([[ -1.00000000e+00,  -1.22460635e-16,  -0.00000000e+00,
        0.00000000e+00],
    [  1.22460635e-16,  -1.00000000e+00,   0.00000000e+00,
        0.00000000e+00],
    [ -0.00000000e+00,   0.00000000e+00,   1.00000000e+00,
        0.00000000e+00],
    [  0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
        1.00000000e+00]])
>>> transformations.euler_from_matrix(m,'sxyz')
(0.0, 0.0, 3.141592653589793)
2013-09-28 21:59:50 -0500 answered a question Error static transform publisher

This might be one, suboptimal, answer for you. Check out the following question:

roslaunch error

The user fixed it by recreating the package in question and copying appropriate files across. They never tracked down the real cause of the problem.

Actually if this answer works for you (don't forget to make the backups!) then you'd probably be doing the community a service if you explored what the problematic difference is between the failing package and the recreated one (by using a backup of the problematic package and reintroducing its differences one by one). Things to pay particular attention to are file permissions, hidden and configuration files, different file contents.

2013-09-28 20:57:22 -0500 received badge  Nice Answer (source)
2013-09-26 19:25:39 -0500 commented question Error tf view_frames

You have some other questions with problems in the tf package. What happens when you run `roscd tf;ls -l . src src/tf src/tf/srv` ? Also, `roscd tf;pwd`

2013-09-26 19:18:54 -0500 commented question Rviz odometry display fixed frame

I don't know about this specific problem, but you can also show the output of `rostopic hz /tf` and `rosrun tf view_frames`.

2013-09-26 19:15:10 -0500 answered a question Storing sensor_msgs::Image from cv_bridge

The signatures for the method (from CvImage) are:

void                    toImageMsg (sensor_msgs::Image &ros_image)   const
sensor_msgs::ImagePtr   toImageMsg ()                                const

So we use the first option. And note that the image message is passed by reference. So you construct your message, let's say it's my_msg, and let's say the image that is a part of it is called img. If your CvImage object is my_cv_img then you would call:

my_cv_img.toImageMsg(my_msg.img);

And you are done. Note that toImageMsg allocates the memory for the image data itself, as can be seen by looking at the code for it: cv_bridge.cpp

2013-09-26 18:58:50 -0500 commented question ros commands are not running

Note: strip the `` from the command before pasting it into a terminal. Also what happens when you press CTRL-C in the terminal where the stalled roscore is running?

2013-09-26 18:58:14 -0500 commented question ros commands are not running

Try running `roscore -v` to get verbose output from roscore and paste the results in your question. Also can you give the output of running `env|grep ROS` before you run roscore? This is to check your environment variables as roscore may do this if ROS_MASTER_URI is set incorrectly.

2013-09-26 18:54:46 -0500 commented question Failed to rosrun static tf publisher

Thanks for the correction jarviscchultz. FuerteNewbie, we would still need to see the command line you gave to get this output.

2013-09-26 18:45:08 -0500 commented question Error static transform publisher

Also, what is the output of the following commands: `find /opt/ros/fuerte/ -name "static_transform_publisher" -exec ls -l \{} \;` and `roscd tf ; ls -l bin |grep static` - maybe it got moved? Both commands should find the executable and get some information about it.

2013-09-25 00:13:41 -0500 commented question Error static transform publisher

So the rosrun command seems to be working but not the roslaunch. This may help others help you: give the output of `env|grep ROS` and `env|grep PATH`. Also do give the full command you use to launch the roslaunch file and its full output. You can edit the question and add it to the bottom.

2013-09-25 00:08:55 -0500 commented question Error static transform publisher

No output to the screen is the behaviour when it is working successfully. It shouldn't put output to the screen; instead it publishes to the /tf topic. You can see if the transform is broadcasting by typing `rosrun tf view_frames` or suchlike in another terminal. Thanks for the correction dornhege.

2013-09-24 21:45:42 -0500 commented question Error static transform publisher

Do you mean nothing happens when you try `rosrun tf static_transform_publisher 1 0 0 0 0 0 base_link base_scan 100`? No output at all? Just return to the prompt? (note: the number of parameters in that rosrun command is wrong. You need another number before base_link as a quaternion is 4 numbers).

2013-09-24 21:43:30 -0500 commented question Static transform publisher

If the question is still the same one, I think you can just update the original question with more details rather than needing to open a new one.. for next time.

2013-09-24 21:30:07 -0500 commented question ros commands are not running

Can you tell what happens when you try and run roscore? Do you get any output?