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

mozcelikors's profile - activity

2016-08-08 01:43:21 -0500 marked best answer Nodelet error while launching pcl_to_scan launch file.

Hi there,

I want to launch the following file to convert pointcloud to laserscan:

<launch>

<!-- Do whatever you need to do to publish /cam3d/depth/points -->



<!-- nodelet manager -->
  <node pkg="nodelet" type="nodelet" name="nodelet_manager" output="screen" respawn="true" args="manager"/>


<!-- throttling -->
  <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle nodelet_manager" respawn="true">
    <param name="max_rate" value="20.0"/>
    <remap from="cloud_in" to="/cam3d/depth/points"/>
    <remap from="cloud_out" to="cloud_throttled"/>
  </node>

<!-- Fake Laser -->
  <node pkg="nodelet" type="nodelet" name="fake_laser" args="load pointcloud_to_laserscan/CloudToScan nodelet_manager" respawn="true">
    <param name="output_frame_id" value="/your_frame_id"/>
    <param name="min_height" value="-0.15"/><!-- Or any other value that suits you etter -->
    <param name="max_height" value="0.15"/><!-- Or any other value that suits you etter -->
    <remap from="cloud" to="/cloud_throttled"/>
  </node>

  <!-- Fake Laser (narrow one, for localization -->
  <node pkg="nodelet" type="nodelet" name="my_laser_narrow" args="load pointcloud_to_laserscan/CloudToScan nodelet_manager" respawn="true">
    <param name="output_frame_id" value="/your_frame_id"/>
    <param name="min_height" value="-0.025"/><!-- Or any other value that suits you etter -->
    <param name="max_height" value="0.025"/><!-- Or any other value that suits you etter -->
    <remap from="cloud" to="/cloud_throttled"/>
    <remap from="scan" to="/narrow_scan"/>
  </node>
</launch>

However, whenever I try to launch this file, I get the following error:

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server <a href="http://ubuntu-ros:53686/">http://ubuntu-ros:53686/</a>

SUMMARY
========

PARAMETERS
 * /fake_laser/max_height
 * /fake_laser/min_height
 * /fake_laser/output_frame_id
 * /my_laser_narrow/max_height
 * /my_laser_narrow/min_height
 * /my_laser_narrow/output_frame_id
 * /pointcloud_throttle/max_rate
 * /rosdistro
 * /rosversion

NODES
  /
    fake_laser (nodelet/nodelet)
    my_laser_narrow (nodelet/nodelet)
    nodelet_manager (nodelet/nodelet)
    pointcloud_throttle (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
**ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet]
ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet]
ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet]
ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet]**
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete

I don't know if I installed nodelet correctly. I need some guidance to troubleshoot these problems:

ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet] ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet] ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet] ERROR: cannot launch node of type [nodelet/nodelet]: can't locate node [nodelet] in package [nodelet]

Any help will be greately appreciated.

2016-05-09 20:58:10 -0500 marked best answer ipc_bridge Example Publisher MATLAB Error

Hi,

I've been following the ipc_bridge package (https://alliance.seas.upenn.edu/~meam620/wiki/index.php?n=Roslab.IpcBridge) in order to connect MATLAB to ROS. I've installed MEX Compiler and able to compile every package with the correct version of GCC (with the help of linking mex compiler with the correct gcc version). Note that I'm using Groovy on Ubuntu 12.04.

However, when I try to run the ~/catkin_ws/src/ipc-bridge/ipc_bridge_stack/ipc_bridge_example/example_publisher.m from MATLAB, I get the following errors:

Warning: Name is nonexistent or not a directory: rospack. 
> In path at 110
  In addpath at 87
  In example_publisher at 9 
Warning: Directory access failure:
/usr/local/MATLAB/R2012a/sys/os/glnxa64/libstdc++.so.6. 
> In path at 110
  In addpath at 87
  In example_publisher at 9 
Warning: Name is nonexistent or not a directory: version `GLIBCXX_3.4.15' not found
(required by /opt/ros/groovy/lib/librospack.so)/bin. 
> In path at 110
  In addpath at 87
  In example_publisher at 9 
Undefined function 'geometry_msgs_Twist' for input arguments of type 'char'.

Error in example_publisher (line 13)
pid=geometry_msgs_Twist('connect','publisher','example_module','twist');

What should I do to overcome this? Any help will be greately appreciated.

2015-08-19 13:05:47 -0500 marked best answer Using diff drive to drive a new robot

Hello,

I'm trying to make a model of my own robot and plugins. However, I can't drive the robot. Moreover,the information is not being published into /gz/cmd_vel or /gazebo/cmd_vel or /gz/odom topics.

Here is the header of my model.sdf

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="myrobot">
    <link name="chassis">
      <pose>0 0 .1 0 0 0</pose>

Here are the plugins of my model.sdf

<plugin name="modelplugin" filename="libmyrobot_sonar_model_plugin.so"/>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
            <alwaysOn>true</alwaysOn>
            <updateRate>10</updateRate>
            <leftJoint>left_wheel_hinge</leftJoint>
            <rightJoint>right_wheel_hinge</rightJoint>
            <wheelSeparation>0.5380</wheelSeparation>
            <wheelDiameter>0.2410</wheelDiameter>
            <torque>20</torque>
            <commandTopic>cmd_vel</commandTopic>
            <odometryTopic>odom</odometryTopic>
            <odometryFrame>odom</odometryFrame>
            <robotBaseFrame>base_footprint</robotBaseFrame>
            <robotNamespace>gz</robotNamespace>
 </plugin>
    ...

I don't understand these parameters, anything else except <robotbaseframe> seems right for my robot. Can anybody explain what should I write in robotBaseFrame tag.

What should I to drive the robot? Do I need any other plugin? Any answer will be much appreciated.

2014-06-20 15:12:19 -0500 received badge  Famous Question (source)
2014-06-20 15:12:19 -0500 received badge  Notable Question (source)
2014-06-20 15:12:19 -0500 received badge  Popular Question (source)
2014-03-29 06:50:29 -0500 received badge  Famous Question (source)
2014-03-27 20:44:02 -0500 received badge  Famous Question (source)
2014-03-25 22:38:18 -0500 received badge  Notable Question (source)
2014-02-08 08:18:44 -0500 received badge  Popular Question (source)
2014-01-28 17:31:32 -0500 marked best answer Transforming PointCloud topic to LaserScan topic

Hello there,

I have been trying to convert a PointCloud topic which is generated by gazebo_ros_openni_kinect into LaserScan topic. The gazebo plugin publishes a simulated openni output to /cam3d/depth/points topic, and it seems to work correctly.

I was able to inspect the code that pcl_to_scan package has, and managed to rebuilt it into a standalone working source file using the ros kinect publisher tutorials and disabling dynamic reconfigure. The file publishes some laser data. However, the laser data seems to decrease over time, and when it reaches 0, it starts over.

For example, when the data is first published: (Range values are around 0.8)

> angle_min: -1.57079637051 angle_max:
> 1.57079637051 angle_increment: 0.0174532923847 time_increment: 0.0 scan_time: 0.0333333350718 range_min:
> 0.10000000149 range_max: 10.0 ranges: [0.8371890783309937,
> 0.8371157646179199, 0.8371505737304688, 0.841155469417572, 0.8416852355003357, 0.8424785137176514, 0.7871079444885254, 0.7877516150474548, 0.7892191410064697, 0.7909254431724548, 0.7928680777549744, 0.7950447797775269, 0.7974526882171631, 0.8000890612602234, 0.8029510378837585, 0.8060353398323059, 0.8093387484550476, 0.8137710094451904, 0.8175548315048218, 0.8215464353561401, 0.8268224000930786, 0.831267774105072, 0.8370987176895142, 0.8419783115386963, 0.8483396172523499, 0.8549846410751343, 0.8604996800422668, 0.8676356673240662, 0.8750333786010742, 0.882685124874115, 0.892191469669342, 0.900374710559845, 0.9087872505187988, 0.9191746711730957, 0.9280658960342407, 0.939006507396698, 0.9502314925193787, 0.9617291688919067, 0.9734877347946167, 0.9875211715698242, 0.9998075366020203, 1.014427661895752, 1.0293407440185547, 1.0445315837860107, 1.0622141361236572, 1.0779519081115723, 1.0962239503860474, 1.1171224117279053, 1.1359834671020508, 1.157501220703125, 1.1817551851272583, 1.2038718461990356, 1.2287416458129883, 1.256429672241211, 1.2844353914260864, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0]

And after a while, it is like this: (Range values are ... (more)

2014-01-28 17:31:25 -0500 marked best answer Converting a PointCloud topic into LaserScan topic

Hello,

I'm working on a project that uses Kinect for robot navigation. We use ROS Groovy as distro and Gazebo for simulation, and have sensor and model plugins for the robot model. We have manipulated kinect model using the .sdf file and added libgazebo_ros_openni_kinect.so file as plugin. So now, whenever we launch the robot model in Gazebo, it publishes topics like these: /cam3d/depth/image_raw, /cam3d/depth/points, /cam3d/rgb/image_raw ...

Our model.sdf contains this part for the kinect model:

<plugin name="kinect" filename="libgazebo_ros_openni_kinect.so" >
      <alwaysOn>true</alwaysOn>
      <updateRate>10</updateRate>
      <pointCloudCutoff>0.001</pointCloudCutoff>
      <imageTopicName>/cam3d/rgb/image_raw</imageTopicName>
      <pointCloudTopicName>/cam3d/depth/points</pointCloudTopicName>
      <cameraInfoTopicName>/cam3d/camera_info</cameraInfoTopicName>
      <depthImageTopicName>/cam3d/depth/image_raw</depthImageTopicName>
      <depthImageInfoTopicName>/cam3d/depth/camera_info</depthImageInfoTopicName>
      <frameName>kinect</frameName>
      <distortion_k1>0.00000001</distortion_k1>
      <distortion_k2>0.00000001</distortion_k2>
      <distortion_k3>0.00000001</distortion_k3>
      <distortion_t1>0.00000001</distortion_t1>
      <distortion_t2>0.00000001</distortion_t2>
      <imageTopicName>kinectimage</imageTopicName>
      <pointCloudTopicName>pcloud</pointCloudTopicName>
      <depthImageTopicName>depth</depthImageTopicName>
      <depthImageCameraInfoTopicName>depthcamerainfo</depthImageCameraInfoTopicName>
 </plugin>

Every package that ROS offers are used with launch files and is included with openni. Since we intend to use only robot model to achieve this, I have to find a way to write a script or manipulate the existing script, just to convert a PointCloud topic (comes from model plugin) to LaserScan topic (output). Is something like that possible? I found pointcloud_to_laserscan package which has source files like cloud_to_scan.cpp cloud_throttle.cpp, but they also use openni and needed to be called from launch file. Any help regarding this issue, or any other easier methods to deal with this situation will be greately appreciated. Thanks in advance.

2014-01-28 17:31:21 -0500 marked best answer Using PointCloud data for object detection

Hello,

I'm working on a project that uses Kinect as sensor for a robot. I intend to use PointCloud library for ROS. However, I don't know how to resolve or use the PointCloud data in order to detect objects. The object detection will be used in order to avoid obstacles using potential fields principle. So, I need to transform PointCloud data to obtain all possible obstacles (their coordinates, width, height, distance) in order to create forces to be used in the robot navigation. I don't know which tutorial should I follow? I would really appreciate if anybody gives me some guidance. Thanks in advance.

2014-01-28 17:31:18 -0500 marked best answer How do I use pcl_to_scan to convert PointCloud into LaserScan?

Hello,

I need to use PointCloud library and convert the point cloud information into LaserScan so that it acts as laser scanner. I found pcl_to_scan (google it) package, But don't know how to use it? Can anybody explain to me its usage? Any answers will be much appreciated.

2014-01-28 17:31:15 -0500 marked best answer How to install ROS on pcDuino ? (Lubuntu 12.04 ARM)

Hello,

Last week, I've purchased a pcDuino. It comes with Lubuntu v12.04. In order to download, compile, and install ROS; I'm following the documentation of Pandaboard from this link the Pandaboard source installation

However, when I try to install the remaining dependencies with the

 sudo rosdep install --from-paths src --ignore-src --rosdistro groovy -y

command. It gives an error that says "Could Not Detect OS: tried windows,ubuntu,...." I don't know if it's because of the reason that pcDuino uses Lubuntu. I've searched about this error but there is no certain answer that I've understood.

It would be appreciated if anybody can help me solve this problem or tell me just an easier way to install ROS on pcDuino?

2014-01-22 19:59:50 -0500 commented answer Eclipse IDE problem

If you assured that you havent done anything wrong there, I can ask a colleague of mine who had the same problem.

2014-01-22 19:57:23 -0500 commented answer Eclipse IDE problem

You have to execute make eclipse-project to a project that you've already created using "roscreate-pkg <pkg-name> roscpp. The folder should be like cd ~/catkin_ws/src/<pkg-name> , provided that your catkin workspace is in ~/catkin_ws.

2013-12-23 11:00:07 -0500 commented question What is the easiest way to create/publish a topic on ROS using a remote MATLAB client?

I've decided to use Rosbridge since it is connected easily using Java-WebSocket and since the MATLAB can use java libraries.

2013-12-23 10:58:25 -0500 commented question ROSBridge : How are data arrays represented and sent via JSON?

I don't know how exactly rosbridge handles the data, but since the websockets are used, the memory spaces of payload and trailer are allocated. With websockets data is sent in between 0x00 and 0xFF in a packet. You can examine the rosbridge_library codes to see the conversion.

2013-12-16 01:57:10 -0500 received badge  Famous Question (source)
2013-12-15 08:41:29 -0500 asked a question Rosbridge TCP Error: __init__() got an unexpected keyword argument 'parameters'

Hello,

I need to use rosbridge tcp in order to communicate with MATLAB through TCP. I've succesfully installed rosbridge tcp (groovy-devel). When I run rosbridge tcp, it says that port 9090 is open for communication and when I send data from the following this matlab script

echotcpip('on',9090)
t = tcpip('localhost',9090);
fopen(t)
JSON_MSG = '{ "op": "publish",  
             "topic": "/gz/cmd_vel", 
             "msg":"{ "linear": "{x : 0.8, y:0.2, z:0.3}", 
             "angular": "{x : 0, y:0, z:0}" }"
            }';
fwrite(t,JSON_MSG)
fclose(t)
echotcpip('off')

I get error on the rosbridge tcp server:

[ERROR] [WallTime: 1386952042.195641] [122.162000] Unable to accept incoming connection.  Reason: __init__() got an unexpected keyword argument 'parameters'
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 45997)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
    self.finish()
  File "./rosbridge_tcp", line 100, in finish
    self.protocol.finish()
AttributeError: RosbridgeTcpSocket instance has no attribute 'protocol'
----------------------------------------

I've also checked what's inside rosbridge_tcp.py and found those parameters. Maybe the problem might be that they're wrongly configured.

# Global ID seed for clients
client_id_seed = 0
clients_connected = 0

# list of possible parameters ( with internal default values <-- get overwritten from parameter server and commandline)
# rosbridge_tcp.py:
port = 9090                             # integer (portnumber)
host = ""                               # hostname / IP as string
incoming_buffer = 65536                 # bytes
socket_timeout = 10                     # seconds
retry_startup_delay = 5                 # seconds
# advertise_service.py:
service_request_timeout = 600           # seconds
check_response_delay = 0.01             # seconds
wait_for_busy_service_provider = 0.01   # seconds
max_service_requests = 1000000          # requests
# defragmentation.py:
fragment_timeout = 600                  # seconds
# protocol.py:
delay_between_messages = 0.01           # seconds
max_message_size = None                 # bytes

I need some help to overcome this issue. Any help will be greately appreciated. Thanks in advance.

2013-12-13 04:28:31 -0500 commented answer Using rosbridge protocol to talk with MATLAB

Okay, rosbridge_tcp is ready. When I send the data I get an error, (at least connection is now correct). Please see the UPDATE2

2013-12-13 03:57:08 -0500 commented answer Using rosbridge protocol to talk with MATLAB

Ah, I got what you say, i'll check

2013-12-13 03:45:36 -0500 commented answer Using rosbridge protocol to talk with MATLAB

sorry that i'm a beginner but where do i check exactly?

2013-12-13 03:40:26 -0500 commented answer Using rosbridge protocol to talk with MATLAB

Strangely, when I do git clone this, rosbridge_tcp does not appear in scripts folder

2013-12-09 09:56:27 -0500 commented answer Using rosbridge protocol to talk with MATLAB

Ah, you're right. I will check that out and get back to you. Thanks for the answer.

2013-12-09 06:06:48 -0500 received badge  Notable Question (source)
2013-12-08 09:39:37 -0500 received badge  Popular Question (source)
2013-12-08 07:36:28 -0500 edited question Using rosbridge protocol to talk with MATLAB

Hello everybody,

I'm working on a project in which I have to communicate between MATLAB and ROS. To do this, I found rosbridge protocol easiest. The rosbridge server opens a socket on port 8080 (using customized launchfile) ( or 9090 by default).

To talk with it through MATLAB, I think it would be good to use tcpip library and send JSON string message. https://github.com/RobotWebTools/rosbridge_suite/blob/hydro-devel/ROSBRIDGE_PROTOCOL.md is the link I'm following to learn about rosbridge protocol.

But I don't know that it would work. (doesn't work for me so far) Does rosbridge protocol parses the string JSON that I sent from MATLAB and advertise/publish/subscribe topics automatically? I've greated a simple /chatter in order to test my hypothesis but I can't get it working. Anyway, I need some help figuring out rosbridge protocol and solving the problems that I've mentioned.

The procedure that I've followed is like this:

(http://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge)

I've installed the rosbridge using this:

sudo apt-get install ros-groovy-rosbridge-server

Then, I've launched the server:

roslaunch rosbridge_server rosbridge_websocket.launch

On the client side, I've used the tcpip MATLAB library

(http://www.mathworks.com/help/instrument/tcpip.html)

Start a TCP/IP echo server and create a TCPIP object.

echotcpip('on',8080)
t = tcpip('localhost',8080);
fopen(t)
JSON_MSG = '';
fwrite(t,JSON_MSG)
fclose(t)
echotcpip('off')

I've entered something on JSON_MSG part but I couldnt receive any data on server side (simply using rostopic echo). Can anybody please give me some ideas on how to use this json message or whether this procedure would work or not? Note that I use ROS groovy with Ubuntu 12.04. Any help will be greatly appreciated. Thank you.

UPDATE: I've tried the following JSON message, but something is wrong. No data is being received from the server side.

{ "op": "publish",  
  "topic": "/gz/cmd_vel", 
  "msg":"{ "linear": "{x : 0.8, y:0.2, z:0.3}", 
         "angular": "{x : 0, y:0, z:0}" }"
}

UPDATE2: I've installed rosbridge_tcp, and run it. Now, when I try to send data from MATLAB, I get the following error on the server side. Although, it does seem OK, when there's no data sent.

[ERROR] [WallTime: 1386952042.195641] [122.162000] Unable to accept incoming connection.  Reason: __init__() got an unexpected keyword argument 'parameters'
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 45997)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 640, in __init__
    self.finish()
  File "./rosbridge_tcp", line 100, in finish
    self.protocol.finish()
AttributeError: RosbridgeTcpSocket instance has no attribute 'protocol'
----------------------------------------