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

THordijk's profile - activity

2021-04-01 05:10:08 -0500 received badge  Famous Question (source)
2020-07-15 17:59:41 -0500 received badge  Famous Question (source)
2020-07-15 17:59:41 -0500 received badge  Notable Question (source)
2020-06-11 00:18:00 -0500 received badge  Popular Question (source)
2020-06-04 07:00:27 -0500 commented question Rviz from docker container on Nvidia Jetson AGX Xavier

I modified my question to show the dockerfile and the run command, aside from that the system is clean.

2020-06-04 06:59:27 -0500 edited question Rviz from docker container on Nvidia Jetson AGX Xavier

Rviz from docker container on Nvidia Jetson AGX Xavier OS: L4T ROS Melodic Currently we are trying to start Rviz from a

2020-06-03 09:53:58 -0500 edited question Rviz from docker container on Nvidia Jetson AGX Xavier

Rviz from docker container on Nvidia Jetson AGX Xavier OS: L4T ROS Melodic Currently we are trying to start Rviz from a

2020-06-03 09:53:45 -0500 edited question Rviz from docker container on Nvidia Jetson AGX Xavier

Rviz from docker container on Nvidia Jetson AGX Xavier OS: L4T ROS Melodic Currently we are trying to start Rviz from a

2020-06-03 09:53:16 -0500 edited question Rviz from docker container on Nvidia Jetson AGX Xavier

Rviz from docker container on Nvidia Jetson AGX Xavier OS: L4T ROS Melodic Currently we are trying to start Rviz from a

2020-06-03 09:51:27 -0500 asked a question Rviz from docker container on Nvidia Jetson AGX Xavier

Rviz from docker container on Nvidia Jetson AGX Xavier OS: L4T ROS Melodic Currently we are trying to start Rviz from a

2020-04-22 12:05:45 -0500 received badge  Famous Question (source)
2020-04-22 12:05:45 -0500 received badge  Notable Question (source)
2019-12-20 21:20:25 -0500 received badge  Notable Question (source)
2019-08-30 09:43:23 -0500 received badge  Famous Question (source)
2019-06-28 07:08:02 -0500 received badge  Famous Question (source)
2019-06-06 13:44:37 -0500 received badge  Popular Question (source)
2019-04-23 00:36:52 -0500 commented question rqt plugin: crash with 'std::bad_alloc'

Okay I will give this a try.

2019-04-20 19:35:46 -0500 received badge  Notable Question (source)
2019-04-19 09:38:23 -0500 received badge  Popular Question (source)
2019-04-19 08:48:42 -0500 commented question rqt plugin: crash with 'std::bad_alloc'

I added it in the original question

2019-04-19 08:48:31 -0500 edited question rqt plugin: crash with 'std::bad_alloc'

rqt plugin: crash with 'std::bad_alloc' I have a rqt plugin that i run as a standalone. I am using ROS kinetic on ubuntu

2019-04-19 03:40:07 -0500 commented question rqt plugin: crash with 'std::bad_alloc'

I am using a Ensenso N35, which is, indeed, a 3d stereo camera that also publishes a generated point cloud at 1.3mp 1280

2019-04-19 03:38:47 -0500 commented question rqt plugin: crash with 'std::bad_alloc'

I am using a Ensenso N35, which is, indeed, a 3d stereo camera that also publishes a generated point cloud.

2019-04-19 02:41:18 -0500 asked a question rqt plugin: crash with 'std::bad_alloc'

rqt-crashed data overload I have a rqt plugin that i run as a standalone. I am using ROS kinetic on ubuntu 16.04. The rq

2019-04-19 02:35:21 -0500 asked a question rqt_plugin launched from launch file on x-server

rqt_plugin launched from launch file on x-server I am using ROS kinetic Ubuntu 16.04, QT Creator 4.8.1, based on QT 5.12

2019-04-10 03:35:59 -0500 commented question Building msg in c++

What is the difference with X = pCloud.data[arrayPosX]? I tried this and it does not return anything, can not tell you

2019-04-10 03:35:47 -0500 commented question Building msg in c++

What is the difference with X = pCloud.data[arrayPosX]? I tried this and it does not return anything, can not tell you w

2019-04-10 03:33:36 -0500 received badge  Notable Question (source)
2019-04-09 11:15:48 -0500 received badge  Popular Question (source)
2019-04-09 10:52:42 -0500 commented question Building msg in c++

True, I got values far from what was reasonable. I use this to filter a range based on Z values.

2019-04-09 10:52:32 -0500 commented question Building msg in c++

True, I got values far from what was reasonal. I use this to filter a range based on Z values.

2019-04-09 10:52:32 -0500 received badge  Commentator
2019-04-09 10:51:13 -0500 commented answer Building msg in c++

Noted. from now i'll go there first.

2019-04-09 09:57:13 -0500 commented question Building msg in c++

The code takes pixel values x and y and retrieves the corresponding xyz coordinates. What would you call it?

2019-04-09 09:55:24 -0500 commented answer Building msg in c++

This worked thank you! I did need to keep points in the statement.

2019-04-09 09:54:53 -0500 commented answer Building msg in c++

This worked thank you!

2019-04-09 09:53:56 -0500 marked best answer Building msg in c++

I am trying to construct a message in c++. I am using Ros kinetic, ubuntu 16.04. I have a message that consists of a list of the Point message from geometry_msgs. The message looks as follows:

geometry_msgs/Point[] points

I use this message to transport a list of xy coordinates. The next node uses these coordinates to filter a distance from a pointcloud msg. The part were it goes wrong is when I try to construct the message that the second node publishes. This has to be a list, similair to the one that is sent from the first node. However, this should consist of xyz coordinates. The code I am using (if more is desired I'll add it):

void pixelTo3DPoint(const sensor_msgs::PointCloud2 pCloud, coord_proces::xyz xy_coord)
{
    // get width and height of 2D point cloud data
    int width = pCloud.width;
    int height = pCloud.height;
    int step;
    int n = 0;
    float min_x = 0;
    float min_y = 0;
    float min_z = 0;

    int list_size = xy_coord.points.size();

    float z_List[list_size];
    float y_List[list_size];
    float x_List[list_size];     

    coord_proces::xyz obj_coords;
    geometry_msgs::Point pt;


    for (int i = 0; i < list_size; i++)
    { 
        const int u = static_cast<int>(xy_coord.points[i].x);
        const int v = static_cast<int>(xy_coord.points[i].y);

        // Convert from u (column / width), v (row/height) to position in array
        // where X,Y,Z data starts
        int arrayPosition = v*pCloud.row_step + u*pCloud.point_step;

        // compute position in array where x,y,z data start      
        int arrayPosX = arrayPosition + pCloud.fields[0].offset; // X has an offset of 0
        int arrayPosY = arrayPosition + pCloud.fields[1].offset; // Y has an offset of 4
        int arrayPosZ = arrayPosition + pCloud.fields[2].offset; // Z has an offset of 8

        float X = 0.0;
        float Y = 0.0;
        float Z = 0.0;

        // Copy the data directly from the location in the message
        memcpy(&X, &pCloud.data[arrayPosX], sizeof(float));
        memcpy(&Y, &pCloud.data[arrayPosY], sizeof(float));
        memcpy(&Z, &pCloud.data[arrayPosZ], sizeof(float));

        if(not(isnan(X)) & not(isnan(Y)) & not(isnan(Z)))
        {
            if((0.05 < Z) & (Z < 2.0))
            {
                ROS_INFO("check1");
                ROS_INFO_STREAM(X);
                pt.x = X;
                pt.y = Y;
                pt.z = Z;
            }
        } 

        obj_coords.points[i].insert(0, pt);   
    }

    // select lowest Z
    ROS_INFO("check3");
    point_pub.publish(obj_coords);  
}

The program progresses to check2, but does not reach check3 after constructing the message. I know for a fact that the values in pt are correct. However it won't store them in obj_coords.points. I am guessing this is caused by my attempt to itterate through the list adding points until all relevant xy combinations are combined with their appropriate z.

How would I go about properly storing all coordinates in the message?

2019-04-09 09:50:23 -0500 commented question Building msg in c++

gvdhoorn, I took the code from someone else, I am not very familiar with c++ so I could not tell you the difference. If

2019-04-09 09:46:31 -0500 edited question Building msg in c++

Building msg in c++ I am trying to construct a message in c++. I am using Ros kinetic, ubuntu 16.04. I have a message th

2019-04-09 09:43:08 -0500 commented question Building msg c++

If you close this due to a duplicate, would you mind referencing this duplicate. I have not been able to find it, hence

2019-04-09 09:15:40 -0500 asked a question Building msg c++

Building msg c++ I am trying to construct a message in c++. I am using Ros kinetic, ubuntu 16.04. I have a message that

2019-04-09 09:14:52 -0500 asked a question Building msg in c++

Building msg in c++ I am trying to construct a message in c++. I am using Ros kinetic, ubuntu 16.04. I have a message th

2019-04-04 00:42:34 -0500 received badge  Enthusiast
2019-03-28 23:05:18 -0500 received badge  Popular Question (source)