Ask Your Question

eirikaso's profile - activity

2019-08-02 06:54:42 -0500 received badge  Notable Question (source)
2019-08-02 06:54:42 -0500 received badge  Famous Question (source)
2019-03-22 10:09:08 -0500 marked best answer Edit encoding of sensor_msgs/Image message

I have a sensor_msgs/Image message that I'm unable to use with standard ROS packages like stereo_image_proc because the "encoding" is described as "8UC1". I want it to be interpreted as "mono8" and want to change the string in the "encoding" parameter of the message.

void imageCallback(sensor_msgs::ImageConstPtr& msg)
{
    ROS_INFO("Message received");
    msg->encoding.at<std::string>(0,0) = "mono8";
}

When I do it like above I get the error message "type name is not allowed" when compiling. I have tried all sorts of alternatives but can't seem to find it out. Can anyone help me on this?

2019-03-22 10:09:07 -0500 commented answer Edit encoding of sensor_msgs/Image message

Yes, thank you. I just tested it 30 minutes ago and got it working :)

2019-03-22 10:07:00 -0500 received badge  Popular Question (source)
2019-03-21 16:58:01 -0500 commented answer Edit encoding of sensor_msgs/Image message

Thank you. I have recorded some .bag files with the Intel realsense camera using their ROS driver. Unfortunately they sa

2019-03-21 12:22:17 -0500 edited question Edit encoding of sensor_msgs/Image message

Edit encoding of sensor_msgs/Image message I have a sensor_msgs/Image message that I'm unable to use with standard ROS p

2019-03-21 12:09:41 -0500 asked a question Edit encoding of sensor_msgs/Image message

Edit encoding of sensor_msgs/Image message Hi I have a sensor_msgs/Image message that I'm unable to use with standard RO

2019-03-21 03:58:13 -0500 received badge  Famous Question (source)
2019-03-21 03:53:45 -0500 received badge  Notable Question (source)
2019-03-21 03:53:45 -0500 received badge  Popular Question (source)
2019-03-12 16:42:32 -0500 received badge  Notable Question (source)
2019-03-12 16:42:32 -0500 received badge  Famous Question (source)
2019-03-12 16:42:32 -0500 received badge  Popular Question (source)
2018-08-22 10:58:04 -0500 received badge  Famous Question (source)
2018-08-22 10:58:04 -0500 received badge  Notable Question (source)
2018-08-17 06:54:50 -0500 received badge  Famous Question (source)
2018-06-14 04:10:17 -0500 received badge  Famous Question (source)
2018-06-14 04:10:17 -0500 received badge  Popular Question (source)
2018-06-14 04:10:17 -0500 received badge  Notable Question (source)
2018-05-29 02:54:55 -0500 edited answer Calculate position of robot

That is absolutely possible, but it is based on some intricate calculations that you need to do. The particular you are

2018-05-29 02:53:52 -0500 answered a question Calculate position of robot

That is absolutely possible, but it is based on some intricate calculations that you need to do. The particular you are

2018-05-29 02:44:44 -0500 asked a question Video feed freeze on mouse click event OpenCV

Video feed freeze on mouse click event OpenCV Hi I'm doing some work on stereo vision using ROS and OpenCV, and are curr

2018-05-22 02:46:01 -0500 marked best answer Running a node on multiple CPU cores

Hi I am trying to publish a camera stream using the "uvc_camera" ( http://wiki.ros.org/uvc_camera ) package. All works well, but I get a low framerate on high resolution. This seems to be due to cpu overload. When I check the cpu usage with "htop", only one core seems to be used by ROS and all the capacity is used. On the other cores however, only avout 20% capacity is used.

Is there any way to make ROS run this node using multiple cpu cores?

2018-05-17 03:24:35 -0500 received badge  Popular Question (source)
2018-05-16 09:26:33 -0500 asked a question Running a node on multiple CPU cores

Running a node on multiple CPU cores Hi I am trying to publish a camera stream using the "uvc_camera" (http://wiki.ros.o

2018-04-05 04:18:13 -0500 commented answer missing libv4l2.h file during compilation

Thank you! I've just been fiddeling blindly around until it works :D This will make things easier!

2018-04-05 04:01:18 -0500 received badge  Commentator
2018-04-05 04:01:18 -0500 commented answer missing libv4l2.h file during compilation

I used catkin build if that is what you mean. Didn't use rosdep prior to that. Maybe that would have fixed it automatica

2018-04-05 02:50:20 -0500 marked best answer missing libv4l2.h file during compilation

Hi I'm trying to compile a package on an odroid but get the error that I'm missing libv4l2.h that is a dependency for the camera driver package I'm installing ( http://wiki.ros.org/uvc_camera ). I have already installed and tested the package on my desktop computer, but my cameras will be connected to the Odroid.

I have installed the v4l2 using the

sudo apt-get install v4l-utils

command. I thought this would install all the files and headers I needed but apparently not. I can't remember to have done anything else on my desktop to get it working. Anyone have any tips on this? I think there are some other .h files missing as well, but I don't think the compiler picked them up as the compilation was terminated due to this error

Here is the error I receive

In file included from /root/catkin_ws/src/camera_umd/uvc_camera/src/stereo.cpp:6:0:/root/catkin_ws/src/camera_umd/uvc_camera/include/uvc_cam/uvc_cam.h:26:21: fatal error: libv4l2.h: No such file or directory compilation terminated.
2018-04-05 02:50:09 -0500 answered a question missing libv4l2.h file during compilation

Figured it out I had to install the following apt-get install libv4l-dev

2018-04-05 02:13:09 -0500 received badge  Organizer (source)
2018-04-05 02:12:27 -0500 asked a question missing libv4l2.h file during compilation

missing libv4l2.h file during compilation Hi I'm trying to compile a package on an odroid but get the error that I'm mis

2018-03-14 10:42:07 -0500 received badge  Famous Question (source)
2018-02-16 13:40:28 -0500 marked best answer aravis camnode Frame error: ARV_BUFFER_STATUS_TIMEOUT

Hi

I am trying to run the aravis camnode but get an error message: Frame error: ARV_BUFFER_STATUS_TIMEOUT

I ran the exact same node with same parameters yesterday, but now I can't get it working.

Here is the complete output I get when running camnode.

eirik@ubuntu:~$ rosrun camera_aravis camnode

"[ INFO] [1393242045.939900524]: Attached cameras:

"[ INFO] [1393242046.944975636]: # Interfaces: 2

"[ INFO] [1393242046.945041653]: # Devices: 1

"[ INFO] [1393242046.945078719]: Device0: Prosilica-02-2110A-06145

"[ INFO] [1393242046.946099931]: Opening: (any)

"[ INFO] [1393242047.043458478]: Opened: Prosilica-02-2110A-06145

"[ INFO] [1393242047.051520121]: Read parameter (string) AcquisitionMode: Continuous

"[ INFO] [1393242047.052089147]: Read parameter (string) ExposureAuto: Off

"[ INFO] [1393242047.052606205]: Read parameter (float) ExposureTimeAbs: 2000.000000

"[ INFO] [1393242047.053004840]: Read parameter (string) GainAuto: Off

"[ INFO] [1393242047.053854332]: Read parameter (string) TriggerMode: Off

"[ INFO] [1393242047.055533795]: Read parameter (string) TriggerSource: Line1

"[ INFO] [1393242047.080100210]: Camera does not support FocusPos.

"[ INFO] [1393242049.092995805]: Using Camera Configuration:

"[ INFO] [1393242049.093051071]: ---------------------------

"[ INFO] [1393242049.093407251]: Vendor name = Prosilica

"[ INFO] [1393242049.093876798]: Model name = GC650M (02-2110A)

"[ INFO] [1393242049.094351734]: Device id = 02-2110A-06145

"[ INFO] [1393242049.094386520]: Sensor width = 659

"[ INFO] [1393242049.094416641]: Sensor height = 493

"[ INFO] [1393242049.094447223]: ROI x,y,w,h = 0, 0, 659, 493

"[ INFO] [1393242049.094473899]: Pixel format = mono8

"[ INFO] [1393242049.094499654]: BytesPerPixel = 1

"[ INFO] [1393242049.094843820]: Acquisition Mode = Continuous

"[ INFO] [1393242049.095200192]: Trigger Mode = Off

"[ INFO] [1393242049.095552045]: Trigger Source = Line1

"[ INFO] [1393242049.095588934]: Can set FrameRate: True

"[ INFO] [1393242049.095950898]: AcquisitionFrameRate = 89.5897 hz

"[ INFO] [1393242049.095984962]: Can set Exposure: True

"[ INFO] [1393242049.096014800]: Can set ExposureAuto: True

"[ INFO] [1393242049.096044887]: Exposure = 2000 us in range [8,6e+07]

"[ INFO] [1393242049.096074699]: Can set Gain: True

"[ INFO] [1393242049.096103940]: Can set GainAuto: True

"[ INFO] [1393242049.096133436]: Gain = 1.000000 % in range [0.000000,22.000000]

"[ INFO] [1393242049.096163338]: Can set FocusPos: False

"[ INFO] [1393242049.096512460]: Network mtu = 8228

"[ INFO] [1393242049.096545200]: ---------------------------

"[ WARN] [1393242049.593426990]: Frame error: ARV_BUFFER_STATUS_TIMEOUT

"[ WARN] [1393242049.616419706]: Frame error: ARV_BUFFER_STATUS_TIMEOUT

"[ WARN] [1393242049.616471828]: Frame error: ARV_BUFFER_STATUS_TIMEOUT

I did get some crash reports on an upgrade. I do not know if that is somehow connected with this problem. The error message for these three reports from package "ros-hydro-roscpp-traits 0.3.17-0precise-20140130-1927-+0000"

Error message: trying to overwrite /opt/ros/hydro/include/ros/message_event which is also in package ros-hydro-roscpp 1.9.50-0precise-20131015-1959-+0000

Error message: trying to overwrite /opt/ros/hydro/include/ros/header.h which is also in package ros-hydro-roscpp 1.9.50-0precise-20131015-1959-+0000

Error message: trying to overwrite /opt/ros/hydro/include/rosbag/buffer.h which is also in package ros-hydro-roscpp 1.9.50-0precise-20131015-1959-+0000

Does anyone have an idea on how to solve this problem? Would be of big help. Thanks!

2018-02-16 13:40:28 -0500 received badge  Self-Learner (source)
2018-02-16 13:40:28 -0500 received badge  Teacher (source)
2018-02-08 07:05:22 -0500 marked best answer Unable to print subscribed sensor_msgs with ROS_INFO

Hello and thanks for reading my post. I am trying to subscribe to a topic from an imu using the sensor_msgs::MagneticField. This topic is published by a 3rd party package called mavros. I am trying to edit the subscriber script from the tutorial, but have some issues printing the data with the ROS_INFO command. I am not sure if I am subsribing to the topic incorrectly, or if it's only an issue with my usage of ROS_INFO. I am trying to print the x variable of the message but the output message looks like this:

[ INFO] [1518093660.171431954]: I heard: [H?H0?`? ]

The documentation for the MagneticField message is here

My code looks like this

#include "ros/ros.h"
#include "sensor_msgs/MagneticField.h"


void chatterCallback(const sensor_msgs::MagneticField::ConstPtr& mag)
{
  ROS_INFO("I heard: [%s]", mag->magnetic_field.x);
}

int main(int argc, char **argv)
{
  ros::init(argc, argv, "listener");

  ros::NodeHandle n;


  ros::Subscriber sub = n.subscribe<sensor_msgs::MagneticField>("/mavros/imu/mag", 1000, chatterCallback);


  ros::spin();

  return 0;
}
2018-02-08 07:02:58 -0500 edited answer Unable to print subscribed sensor_msgs with ROS_INFO

I found the error. I had to change the [%s] with [%f] for float. Silly mistake

2018-02-08 07:02:38 -0500 answered a question Unable to print subscribed sensor_msgs with ROS_INFO

I found the error. I had to change the [%s] with [%f] for float.

2018-02-08 06:54:06 -0500 edited question Unable to print subscribed sensor_msgs with ROS_INFO

Unable to print subscribed sensor_msgs with ROS_INFO Hello and thanks for reading my post. I am trying to subscribe to a

2018-02-08 06:53:49 -0500 edited question Unable to print subscribed sensor_msgs with ROS_INFO

Print subscribed sensor_msgs with ROS_INFO Hello and thanks for reading my post I am trying to subscribe to a topic from

2018-02-08 06:44:20 -0500 asked a question Unable to print subscribed sensor_msgs with ROS_INFO

Print subscribed sensor_msgs with ROS_INFO Hello and thanks for reading my post I am trying to subscribe to a topic from

2018-01-30 09:54:09 -0500 received badge  Notable Question (source)
2018-01-25 09:31:14 -0500 marked best answer Publish message on geometry_msgs/TwistStamped from terminal

Hi there I'm back to using ROS after a few years break and would appreciate some help.

I'm trying to publish a message from the terminal but are having trouble getting the arguments right. Could anyone help me with this?

The message is geometry_msgs/TwistStamped: http://docs.ros.org/jade/api/geometry...

std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
geometry_msgs/Twist twist
  geometry_msgs/Vector3 linear
    float64 x
    float64 y
    float64 z
  geometry_msgs/Vector3 angular    
    float64 x
    float64 y
    float64 z

I have tried all sorts of combinations but no luck.

One example:

rostopic pub -r 100 /mavros/setpoint_velocity/cmd_vel geometry_msgs/TwistStamped "{header: auto, twist.linear:[1, 2, 3], twist.angular:[1, 1, 1]}"