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

SpacemanSPIFF's profile - activity

2024-03-09 09:13:56 -0500 received badge  Famous Question (source)
2023-09-08 14:09:53 -0500 received badge  Notable Question (source)
2023-09-08 14:09:53 -0500 received badge  Popular Question (source)
2023-06-25 21:27:47 -0500 asked a question Unable to find tf2_ros/transform_listner.h with ros2 Humble

Unable to find tf2_ros/transform_listner.h with ros2 Humble I am trying to compile the HesaiLidar_General_ROS ros2 branc

2020-11-11 01:35:35 -0500 received badge  Nice Answer (source)
2020-02-28 06:58:15 -0500 marked best answer Trying to publish 16 bit images as ROS msg

Hi all,

I am trying to publish sensor msg from lepton camera connected over SPI. The images that I get from the sensor is 14 bit, I have zero padded it and have it as 16 bit value. I am trying to publish the 16 bit image as sensor::msgs Image, but the the image message type can hold only 8 bit of data as the data type is uint8[] data (I used the encoding mono16). Then I tried with opencv Mat and cv_bridge, the relevant code is

cv::Mat image_holder(IR_img.height,IR_img.width, CV_16UC1);
for(int i=(NO_BITS_SKIP+1); i<FRAME_SIZE_UINT16;i++)
        {
            if(i % PACKET_SIZE_UINT16 < 2)
                continue;
            image_holder.at<uchar>(ii,jj)=(unsigned char)init_buf[i];
            jj++;
            if(jj==80)
            {
                jj=0;
                ii++;
            }
            if(ii==60)
            {
                ii=0;
            }
        }

where init_buf is a 16bit pointer to the data. When i assign the values into the matrix, its ignoring the 2nd byte and considers only 1st byte. and surprisingly the size of the image is half the size.

This is the 8bit image (successfully published)

image description

16bit image I am having problems with

image description

I am not sure where i am going wrong. Is there a tutorial I can refer to for publishing 16 bit grayscale images? Any help is greatly appreciated..

I am using ROS indigo and opencv 2.4.8

Thanks

2019-05-20 02:37:03 -0500 marked best answer Use of CSI-2 Based cameras on Jetson TX-2 for mapping

Hi all,

Im planning to develop a platform with Nvidia Tx-2 and 5 cameras. I'm trying to choose a camera and 'm really confused. I was thinking of choosing CSI-2 cameras as TX-2 has 6 CSI-2 ports, but I wasn't sure how hard it is going to be to integrate the CSI-2 camera on to ROS. Or should I stick with USB cameras and get a carrier board with USB hub on it. Any suggestions and help is greatly appreciated.

Thanks

2019-05-20 01:45:03 -0500 marked best answer Multi-touch support for RVIZ visualizer

Hey all,

I am trying to visualize maps on RVIZ on a touch screen display with multi-touch support. Rviz visualization window doesn't seem to support touch. The only thing i can do it rotate, pinch zoom or pan doesn't work, even though the gesture recognition is turned on in the OS.

I was looking into the tutorials, for rviz, and the rviz::VisualizationManager allows only mouse events and not touch events. Is my understanding right, is there any way around it??

Any ideas for panning and zooming the maps are appreciated.

I am using ROS Kinetic on Ubuntu 16.04.

Thanks

2018-12-07 05:32:20 -0500 received badge  Famous Question (source)
2018-12-07 05:32:20 -0500 received badge  Notable Question (source)
2017-11-26 15:46:12 -0500 received badge  Famous Question (source)
2017-11-23 04:03:52 -0500 received badge  Popular Question (source)
2017-11-22 14:58:38 -0500 edited question Multi-touch support for RVIZ visualizer

Multi-touch support for RVIZ visualizer Hey all, I am trying to visualize maps on RVIZ on a touch screen display with m

2017-11-22 14:58:17 -0500 edited question Multi-touch support for RVIZ visualizer

Multi-touch support for RVIZ vistualizer Hey all, I am trying to visualize maps on RVIZ on a touch screen display with m

2017-11-22 14:57:40 -0500 asked a question Multi-touch support for RVIZ visualizer

Multi-touch support for RVIZ vistualizer Hey all, I am trying to visualize maps on RVIZ on a touch screen display with m

2017-09-28 03:01:41 -0500 received badge  Notable Question (source)
2017-09-15 18:11:16 -0500 received badge  Self-Learner (source)
2017-09-15 18:11:16 -0500 received badge  Teacher (source)
2017-09-15 18:10:09 -0500 received badge  Popular Question (source)
2017-09-15 12:49:09 -0500 marked best answer udev rules for multiple hokuyo LiDARS doesn't work: urg_node

Hey,

I am using multiple hokuyo lidars with nvidia TX2. I am using Ubuntu 16.04 Linux for Tegra with Kinetic ROS distribution. I am trying to write a udev rule to create a symlink with the id. this is what I have right now

SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="15d1", ATTRS{idProduct}=="0000", MODE="0666", PROGRAM="/opt/ros/kinetic/lib/urg_node/getID /dev/%k q", SYMLINK+="sensors/hokuyo_%c"

which is same as what is mentioned in the driver page. But unfortunately, the rule is'nt creating a symlink but the permissions for the file is applied. I am not sure what is happening. Running udevadm test -a add $(udevadm info -q path -n /dev/ttyACM1) prints out the error. The relevant part of the output is

PROGRAM '/opt/ros/kinetic/lib/urg_node/getID /dev/ttyACM1 q' /etc/udev/rules.d/99-mapbaby.rules:5
starting '/opt/ros/kinetic/lib/urg_node/getID /dev/ttyACM1 q'
'/opt/ros/kinetic/lib/urg_node/getID /dev/ttyACM1 q'(err) '/opt/ros/kinetic/lib/urg_node/getID: error while loading shared libraries: liburg_c_wrapper.so: cannot open shared object file: No such file or directory'
Process '/opt/ros/kinetic/lib/urg_node/getID /dev/ttyACM1 q' failed with exit code 127.
handling device node '/dev/ttyACM1', devnum=c166:1, mode=0660, uid=0, gid=20
preserve permissions /dev/ttyACM1, 020660, uid=0, gid=20
preserve already existing symlink '/dev/char/166:1' to '../ttyACM1'
found 'c166:1' claiming '/run/udev/links/\x2fserial\x2fby-id\x2fusb-Hokuyo_Data_Flex_for_USB_URG-Series_USB_Driver-if00'
found 'c166:0' claiming '/run/udev/links/\x2fserial\x2fby-id\x2fusb-Hokuyo_Data_Flex_for_USB_URG-Series_USB_Driver-if00'
creating link '/dev/serial/by-id/usb-Hokuyo_Data_Flex_for_USB_URG-Series_USB_Driver-if00' to '/dev/ttyACM1'
preserve already existing symlink '/dev/serial/by-id/usb-Hokuyo_Data_Flex_for_USB_URG-Series_USB_Driver-if00' to '../../ttyACM1'
found 'c166:1' claiming '/run/udev/links/\x2fserial\x2fby-path\x2fplatform-3530000.xhci-usb-0:3.4.1:1.0'
creating link '/dev/serial/by-path/platform-3530000.xhci-usb-0:3.4.1:1.0' to '/dev/ttyACM1'
preserve already existing symlink '/dev/serial/by-path/platform-3530000.xhci-usb-0:3.4.1:1.0' to '../../ttyACM1'

I'm not sure why the liburg_c_wrapper.so is failing. The program functions fine when executed from the terminal.

Any help is greatly appreciated.

Thanks

2017-09-15 12:49:03 -0500 answered a question udev rules for multiple hokuyo LiDARS doesn't work: urg_node

I used KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="15d1", MODE="0666", GROUP="dialout", PROGRAM="/bin/sh -

2017-09-14 18:50:12 -0500 received badge  Famous Question (source)
2017-09-14 18:50:12 -0500 received badge  Notable Question (source)
2017-09-14 18:42:53 -0500 asked a question udev rules for multiple hokuyo LiDARS doesn't work: urg_node

udev rules for multiple hokuyo LiDARS doesn't work: urg_node Hey, I am using multiple hokuyo lidars with nvidia TX2. I

2017-07-25 13:33:44 -0500 received badge  Famous Question (source)
2017-07-24 05:59:38 -0500 received badge  Notable Question (source)
2017-07-24 05:59:38 -0500 received badge  Popular Question (source)
2017-07-02 04:18:16 -0500 received badge  Notable Question (source)
2017-05-30 17:19:23 -0500 commented answer How to change Hokuyo min and max angle values?

Shashank_Rao: run rosrun rqt_reconfigure rqt_reconfigure opens a GUI to adjust the parameters.. If you wanna use the com

2017-05-05 13:45:25 -0500 asked a question Use of CSI-2 Based cameras on Jetson TX-2 for mapping

Use of CSI-2 Based cameras on Jetson TX-2 for mapping Hi all, Im planning to develop a platform with Nvidia Tx-2 and 5

2017-04-27 19:12:33 -0500 received badge  Popular Question (source)
2016-09-11 13:41:00 -0500 received badge  Taxonomist
2016-08-18 10:39:33 -0500 answered a question Image looks open exposed while using imwrite on opencv

@Dimitri: Thanks for letting me know that JPG doesn't support 16 bit images on OpenCV. I tried the convertTo function as you mentioned, but for some reason gave a completely dark image. I guess the image was normalized between 0-1. Instead i tried cv::normalize() which worked. Here is the modified code.

void img_listener::callbackirimage(const sensor_msgs::Image::ConstPtr& msg)
{
        ir_img_ptr=cv_bridge::toCvCopy(msg,sensor_msgs::image_encodings::MONO16);
        rep_ros_ir_time[ir_image_count] = msg->header.stamp.toSec();
    #ifdef _DEBUG
        ROS_INFO("The reported color image time :%15.15f",rep_ros_clr_time[color_image_count]);
    #endif
        //ir_img_ptr->image.convertTo(ir_img[ir_image_count],CV_8UC1,(double)(1.0/256.0),0);
        cv::normalize(ir_img_ptr->image,ir_img[ir_image_count],0,255,cv::NORM_MINMAX,CV_8UC1);
        //ir_img[ir_image_count].convertTo(ir_img[ir_image_count],CV_8UC1,256,0);
        //ir_img[ir_image_count] = ir_img_ptr->image;
        if (ir_image_count >= FRAME_RATE_COLOR_IMG)
            ir_image_count=0;
        else
            ir_image_count++;
}

Thanks for the help. I really appreciate it.

2016-08-18 10:31:59 -0500 received badge  Popular Question (source)
2016-08-12 12:01:03 -0500 edited question Image looks open exposed while using imwrite on opencv

I am trying to save 16 bit images from ROS bag as .jpg, but where i save them, my images look over exposed, but when I use matlab its saved correctly. I'm not sure where I am screwing things up. My function is shown below.

void img_listener::callbackirimage(const sensor_msgs::Image::ConstPtr& msg)
{
        ir_img_ptr=cv_bridge::toCvCopy(msg,msg->encoding);
        rep_ros_ir_time[ir_image_count] = msg->header.stamp.toSec();
    #ifdef _DEBUG
        ROS_INFO("The reported color image time :%15.15f",rep_ros_clr_time[color_image_count]);
    #endif
        //ir_img_ptr->image.convertTo(ir_img[ir_image_count],CV_8UC1,(double)(1.0/256),256);
        //ir_img_ptr->image.convertTo(ir_img[ir_image_count],CV_8UC1);
        ir_img[ir_image_count] = ir_img_ptr->image;
        if (ir_image_count >= FRAME_RATE_COLOR_IMG)
            ir_image_count=0;
        else
            ir_image_count++;
}

where

 cv::Mat ir_img[FRAME_RATE_COLOR_IMG];

When I perform a imshow or a imwrite, the resultant image looks over exposed .image description

as compared to

image description

Setup: Ubuntu, ros jade, opencv 2.4.8. Any Help is greatly Appreciated.

Thanks Akshay

2016-08-12 12:01:03 -0500 received badge  Editor (source)