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

casper911ca's profile - activity

2020-06-05 01:55:10 -0500 received badge  Student (source)
2017-03-01 07:41:59 -0500 received badge  Necromancer (source)
2017-03-01 07:41:59 -0500 received badge  Teacher (source)
2015-09-01 10:01:00 -0500 received badge  Famous Question (source)
2015-08-12 10:37:50 -0500 received badge  Notable Question (source)
2015-08-05 07:46:06 -0500 received badge  Popular Question (source)
2015-08-04 19:12:20 -0500 asked a question SLAM with LIDAR

I've been posting similar questions on open topics, but that may have not been the proper way to address the forum.

This may seen like a data dump, but I'm trying to be as complete as possible here so that one can see as much about what I have going on as possible. Of course, I will provide if more information if more is needed.

Thank you guys in advance for any help or leads you can provide.

Using ros indigo

I've seen several examples of real-time and post-processed slam with RPLIDAR. Just a few: https://www.youtube.com/watch?v=uZDeNKbcnuE

https://www.youtube.com/watch?v=pCF7P7u8pDk

https://youtu.be/gy9cDuaNW1w?t=48s

Now I've been fiddling with launch files for a couple months now on my free time with little luck as I know very little about how ros is structured and how to tie one tool to another. I've been basically making a Frankenstein Monster launch file and crossing my fingers.

I'm not receiving any errors and RVIS launches with out any problems and I can see the realtime data plotted on the 2D plane as red squares. I set the Global Fixed Frame to "map" and the RPLidarLaserScan display (really just LaserScan) Topic to "/scan". Then I add the "Map" display and set the topic to "/map". And press "Reset" at the bottom. The 2D plane on the display changes color to the "map" color, but I still do not see an occupancy grid, just the same red squares.

I feel like I'm missing something simple, like I'm not listening in on the right published topic. I've tried all the permuations of topic combinations but I cannot get a nice slam occupancy grid or map.

It might be easier to make a .bag file and post process it through hector mapping. Does anyone

Here is my current launch file:

<!--
  Used for visualising rplidar in action.  

  It requires rplidar.launch.
 -->
<launch>
  <include file="$(find rplidar_ros)/launch/rplidar.launch" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/rplidar.rviz" />
  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
    <!-- Frame Names -->
    <param name="base_frame" value="base_link" />
    <!-- param name="base_frame" value="/laser" -->
    <param name="map_frame" value="map" />
    <param name="odom_frame" value="base-link" />
    <!-- param name="odom_frame" value="/laser" -->

    <!-- Tf use -->
    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="true"/>

    <!-- Map size / start point -->

    <param name="map_resolution" value="0.050"/>
    <param name="map_size" value="2048"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5" />
    <param name="map_multi_res_levels" value="2" />

    <!-- Map update parameters -->
    <param name="update_factor_free" value="0.4"/>
    <param name="update_factor_occupied" value="0.9" />
    <param name="map_update_distance_thresh" value="0.4"/>
    <param name="map_update_angle_thresh" value="0.06" />
    <param name="laser_z_min_value" value = "-.5" />
    <param name="laser_z_max_value" value = "0.5" />

    <!-- Advertising config -->
    <param name="advertise_map_service" value="true"/>

    <param name="scan_subscriber_queue_size" value="5"/>
    <param name="scan_topic" value="/laser/scan"/>
    <!-- param name="scan_topic" value ...
(more)
2015-08-04 15:18:06 -0500 answered a question hector_slam + hector_mapping + RVIZ

I'm trying to do this as well with the RPLIDAR. I've been struggling for weeks to little avail. I cannot seem to get a live SLAM map onto rvis. I'm not using lidar for mechatronics, I'm using it as a tool for creating fast models of interior spaces - so basically, this is all I need. I also haven't successfully sent a .bag file through any of the slam algorithm plugins. With my current launch file all i get is a real time map.

Here is my .launch file:

<!--
  Used for visualising rplidar in action.  

  It requires rplidar.launch.
 -->
<launch>
  <include file="$(find rplidar_ros)/launch/rplidar.launch" />
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/rplidar.rviz" />
  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
    <!-- Frame Names -->
    <param name="base_frame" value="base_link" />
    <!-- param name="base_frame" value="/laser" -->
    <param name="map_frame" value="map" />
    <param name="odom_frame" value="base-link" />
    <!-- param name="odom_frame" value="/laser" -->

    <!-- Tf use -->
    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="true"/>

    <!-- Map size / start point -->

    <param name="map_resolution" value="0.050"/>
    <param name="map_size" value="2048"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5" />
    <param name="map_multi_res_levels" value="2" />

    <!-- Map update parameters -->
    <param name="update_factor_free" value="0.4"/>
    <param name="update_factor_occupied" value="0.9" />
    <param name="map_update_distance_thresh" value="0.4"/>
    <param name="map_update_angle_thresh" value="0.06" />
    <param name="laser_z_min_value" value = "-1.0" />
    <param name="laser_z_max_value" value = "1.0" />

    <!-- Advertising config -->
    <param name="advertise_map_service" value="true"/>

    <param name="scan_subscriber_queue_size" value="5"/>
    <param name="scan_topic" value="/laser/scan"/>
    <!-- param name="scan_topic" value="/laser/scan" -->

    <param name="tf_map_scanmatch_transform_frame_name" value="scanmatcher_frame" />
  </node>


  <node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 50" />
<node pkg="tf" type="static_transform_publisher" name="laser_link" args="0.031 0.0 0.251 0.0 0.0 0.0 /base_frame /laser 100" />
  <node pkg="tf" type="static_transform_publisher" name="map_2_base_footprint" args="0 0 0 0 0 0 /map /base_footprint 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_footprint_2_base_link" args="0 0 0 0 0 0 /base_footprint /base_link 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_link_2_base_stabilized_link" args="0 0 0 0 0 0 /base_link /base_stabilized 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_stablized_2_base_frame" args="0 0 0 0 0 0 /base_stabilized /base_frame 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_2_nav_link" args="0 0 0 0 0 0 /base_frame /nav 100"/>
  <node pkg="tf" type="static_transform_publisher" name="base_frame_2_laser_link" args="0 0 0 0 0 0 /base_frame /laser_link 100"/> 
   <!-- cnode pkg="tf" type="static_transform_publisher" name="imu_link" args="-0.049 0.0 0.180 0.0 0.0 0.0 /base_link /imu 50" -->

<!-- 
  <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
    <param name="target_frame_name" type="string" value="/map" />
    <param name="source_frame_name" type="string" value="laser" />
    <param name="trajectory_update_rate" type="double" value="4" />
    <param name="trajectory_publish_rate" type="double" value="0.25" />
  </node>

  <node pkg="hector_geotiff" type="geotiff_node" name="hector_geotiff_node" output="screen" launch-prefix="nice -n 15">
    <remap from="map" to ...
(more)
2015-07-31 14:54:42 -0500 commented answer Hector mapping stabilized frame

fmarques, how do you modify the urdf? I'm assuming there is an existing file somewhere. When I search for urdf, I get dozens of files; pr2.urdf.xacro, urdf.rvis, etc. many located in ros/indigo/share/

2015-07-31 14:33:03 -0500 commented question Hector_Slam ROSLaunch Error

Same issue here

HectorSM map lvl 1: cellLength: 0.1 res x:1024 res y: 1024
[rviz-2] process has died

using this launch file: https://code.google.com/p/tu-darmstad...

2015-07-23 17:12:51 -0500 commented answer RVIZ SLAM RPLidar problem

Same issue here. I would like hector mapping, rather than some real time map. Many people have seemed to figured this out, but I cannot for the life of me find any precise documentation on how. I feel I'm missing something simple. I've tried MRPT but the driver is buggy and distorts the data.

2015-01-14 17:25:54 -0500 answered a question rplidar driver installation problem on Ubuntu

Thanks everyone. Adding my user to the dialout group worked perfectly. I discovered that the sensor is renamed each time it is unplugged and plugged back in, which was part of my problem (ie - instead of ttyUSB0 it became ttyUSB1).

I still seem to get the

No tf data.  Actual error: Fixed Frame [laser] does not exist

I do not know what I need to do to my .launch file to correct this. I can get realtime data, as in it publishes data, but I don't know what to do about this error.

2015-01-05 06:04:33 -0500 received badge  Famous Question (source)
2014-12-17 02:49:57 -0500 received badge  Notable Question (source)
2014-12-16 12:07:50 -0500 received badge  Supporter (source)
2014-12-16 12:05:00 -0500 received badge  Popular Question (source)
2014-12-15 22:41:09 -0500 asked a question rplidar driver installation problem on Ubuntu

Apologies for posting here, but since robopeak's rplidar does not seem to have very much on the support side since it does appear to be R&D hardware. My ultimate goal here is to get RPLIDAR to work with rvis so I thought I would attempt as asking here.

I have attempted to get RPLIDAR to talk to Linuxmint 17 system and an Ubuntu 14.04 system. And when I run:

$ roslaunch rplidar_ros view_rplidar.launch

Error, cannot bind to the specified serial port /dev/ttyUSB0.

And the GUI warns:

No tf data.  Actual error: Fixed Frame [laser] does not exist

I believe the problem is that the USB to UART driver is installed with root permissions because I get the same error when I run the rplidar example program:

$ ./ultra_simple /dev/ttyUSB0
Error, cannot bind to the specified serial port /dev/ttyUSB0.

But it runs correctly when I run the above command under root:

$ sudo  ./ultra_simple /dev/ttyUSB0
   theta: 151.48 Dist: 00124.75 Q: 10 
   theta: 152.72 Dist: 00126.00 Q: 10 
   theta: 153.95 Dist: 00127.00 Q: 10 
   theta: 155.19 Dist: 00128.00 Q: 11 
   theta: 156.41 Dist: 00130.00 Q: 11 
   theta: 157.64 Dist: 00132.25 Q: 10 
   theta: 158.88 Dist: 00134.00 Q: 11 
   theta: 160.11 Dist: 00137.50 Q: 10 
   theta: 161.33 Dist: 00141.00 Q: 10

Is there way to install the driver without root permissions? Below is how I installed the driver:

$ cd Linux_3.x.x_VCP_Driver_Source
~/Linux_3.x.x_VCP_Driver_Source$ make
~/Linux_3.x.x_VCP_Driver_Source$ sudo cp cp210x.ko /lib/modules/3.13.0-43-generic/kernel/drivers/usb/serial/usbserial.ko
~/Linux_3.x.x_VCP_Driver_Source$ sudo insmod /lib/modules/3.13.0-43-generic/kernel/drivers/usb/serial/usbserial.ko
$insmod: ERROR: could not insert module /lib/modules/3.13.0-43-generic/kernel/drivers/usb/serial/usbserial.ko: File exists
$sudo insmod cp210x.ko

Can I do a simple chmod? Or is there a way to run ROS as root? When I run it with sudo it get 'command not found':

/catkin_ws$ sudo roslaunch rplidar_ros view_rplidar.launch
sudo: roslaunch: command not found

Thanks!