Git Product home page Git Product logo

breezyslam's People

Contributors

anlow12 avatar delta-sigma avatar fisherinnovation avatar mattlubas avatar simondlevy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

breezyslam's Issues

Java Compilation Issues

I have not been successful at compiling the java code for either of the 2 machines that I am testing, one is operating on Windows 10 and one is operating on OSX El Capitan. On OSX, when running make in the algorithms folder, I get the error:

gcc -shared -Wl,-soname,libjnibreezyslam_algorithms.so -o libjnibreezyslam_algorithms.so jnibreezyslam_algorithms.o \
	            coreslam.o coreslam_sisd.o random.o ziggurat.o
ld: unknown option: -soname
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The option -soname appears to not exist and I cannot find any documentation on it.

On Windows 10, the build appears to be successful for both the algorithms and robots folders, but not the components folder, where it complains about undefined references to random_normal.

The code appears to compile find on Debian 9, perhaps the Makefile is broken for the other operating systems?

How to run java examples on OSX?

Hi,

I followed the documentation but only I could run Python examples.
With Java, I receive the following error:

 examples git:(master) ✗ make javatest                        
java -classpath ../java:. -Djava.library.path=../java/edu/wlu/cs/levy/breezyslam/algorithms:../java/edu/wlu/cs/levy/breezyslam/components Log2PGM \
         exp2 0 9999
Loading data from exp2.dat ... 
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnibreezyslam_algorithms in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1122)
        at edu.wlu.cs.levy.breezyslam.algorithms.RMHCSLAM.<clinit>(RMHCSLAM.java:36)
        at Log2PGM.<init>(Log2PGM.java:202)
        at Log2PGM.main(Log2PGM.java:330)
make: *** [javatest] Error 1
➜  examples git:(master) ✗ A

Any help?

How to get data from RPLidar?

Hello! I have the exp1.dat in examples folder from where i generate the map, but how could i generate the exp1.dat with data from RPLidar?
Raspberry PI2

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

hokuyo_connect:_connect:_get_sensor_info: response does not match:

Environment

  • Using LiDAR URG-04LX (Hokuyo Automatic Co.,Ltd.)
  • Python 2.7.6
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty
$ uname -a
Linux mycomputer 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Error

This error isn't systematic.
If I try enough times it will eventually work (?)

~$ ./BreezySLAM/examples/urgslam.py
breezylidar.URG04LX:hokuyo_connect:_connect:_get_sensor_info: response does not match:
breezylidar.URG04LX:hokuyo_connect:_connect:_get_sensor_info_and_params: unable to get status!
breezylidar.URG04LX:hokuyo_connect:_connect: could not get status data from sensor
Traceback (most recent call last):
  File "./BreezySLAM/examples/urgslam.py", line 36, in <module>
    lidar = Lidar(LIDAR_DEVICE)
TypeError: Wrong/insufficient arguments passed to URG04LX.__init__() 

Java can't find library when launching from terminal

Hello,
I have BreezySLAM unzipped in a folder and I ran all of the makes necessary. In my IDE (NetBeans) I am able to run a slam program by adding the BreezySLAM/java folder to the libraries section of my program in NetBeans. However, when I try to run the jar of the same program through the terminal it gives me these errors: java.lang.NoClassDefFoundError, java.lang.ClassNotFoundException. They regard the BreezySLAM libraries, here is the output from the terminal. I'm running Ubuntu.

java -jar ./ARMR.jar
Stable Library
Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB1
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB0
Exception in thread "main" java.lang.NoClassDefFoundError: edu/wlu/cs/levy/breezyslam/components/Laser
at armr.LIDARProcessor.initSlam(LIDARProcessor.java:53)
at armr.LIDARProcessor.(LIDARProcessor.java:48)
at armr.ARMRInitialize.(ARMRInitialize.java:47)
at armr.run.main(run.java:22)
Caused by: java.lang.ClassNotFoundException: edu.wlu.cs.levy.breezyslam.components.Laser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more

The same errors happen when I run the command:
java -cp './ARMR.jar:usr/local/lib/BreezySLAM/java/' armr.run
or the command:
java -cp './ARMR.jar:usr/local/lib/BreezySLAM/
' armr.run

I have also tried adding the libraries directly to the project, and messing around with maven. Does anyone know how to fix this? Thanks in advance.

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

Odometry doesn't improve SLAM.

I've been using breezySLAM for over a year and I've always had the issue that when the robot is moving between long hallways the SLAM gets messed up, the robot position doesn't change but the map moves instead. I suppose that since the laser scans (the slam image) are almost the same the algorithm doesn't know that the robot is moving. So I thought that this will improve using the odometry data.
Based on your WheeledRobot and the C++ source code I implemented a class which I already tested and works like a charm, meaning that if I move forward 10 feet I get dxy_millimeters = 3040 and if I rotate to the right 90 degrees I get dtheta_degrees = 90 to 94 so I know I'm getting the right dxy_millimeters, dtheta_degrees, dt_seconds values.
Im calling RMHC_SLAM.update(scan_mm, velocities) and Im getting the same messed up SLAM like if it wasn't taking into account that the robot is moving as shown in the velocity.
Let me know what can I do.

No module named 'roboviz'

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

How to interface with other LIDAR sensors

Hi,
I would like to use BreezySLAM on a robot with either a RPLidar a2 or Scanse Sweep sensor, and I'm having some trouble wrapping my head around how to do it using Python.
In the Python examples, to update the SLAM the following is done:
(In urgslam.py)
slam.update(lidar.getScan())
(In xvslam.py)
slam.update([pair[0] for pair in lidar.getScan()])

What data type is required for the slam.update() function? Is it just a list of scan distances in mm?
Additionally, how can simple odometry be used when updating?
Thanks!

save data?

I can get lidar scanned data, how to save the data like exp1.data, what it's data format, can you provide me with a demo? Thank you

Getting an import Error on Raspberry Pi

Even after doing: sudo python3 setup.py install

I am getting this error:
ImportError: No module named breezyslam.algorithms

How could I solve it?

I am running on a Raspberry Pi 3.

Why do we have to interpolate in coreslam.c?

/* Interpolate */
for (k=0; ksize; ++k)
{
lidar_distances_mm[k] = (int)interpolate(interp->angles, interp->distances, scan_size, (float)k);
}
I think these lines (lines 119-122) will return the origin but sorted values in lidar_distances_mm. So why we need to interpolate while we already have it?

Error without odemetry

@simondlevy I have been using an RPLidar and breezyslam. However I am noticing that the algorithm isn't calculating a new position based on the lidar data. I am not using odemetry. Is this a bug or am I doing something wrong?
I am also using Python 3.6

So how do you use same map again?

I am aware of setmap(), but using it makes it overwritten by new map and totally ruins whole slam. As I understand, it should be possible to localize from any already mapped point when using previously generated map?

how to do the slam with all the value of lidar zero with odometries

There is an issue, which in a big room without too many obstacles but with odometries. In this case, the value of the lidar may be zeros for 360 degrees. when it happens, the breezyslam fails to build up a correct map.
what can i do in this case?

for example, the data with timestamp(ms), odometries(left, right), lidar value(360 values) as following:
3571699714 36950 36299 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3571699916 36950 36299 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Many thanks

C++ Compilation Issues

I have cd to BreezySLAM/cpp, and do 'sudo make install'.
But when I then cd to BreezySLAM/examples and do 'sudo make install', I got 'make: *** No rule to make target 'log2pgm.cpp', needed by 'log2pgm.o'. Stop.'
Can you give me some suggestion? Thanks!

no module named roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

using multiple lidars

how would cheap lidars (rplidar, etc) act around other same lidars? would they interfare?

cvslamshow.py

Some of the example python code looks for a module named cvslamshow, but there is no such file.

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

Why computeVelocities returns doubled distance?

in vehicles.py distance calculates as:

    dxyMillimeters =  self.wheelRadiusMillimeters * \
            (math.radians(leftDiffDegrees) + math.radians(rightDiffDegrees))

Obviously, if two 1mm radius wheels rotate by 1rad we get 2mm distanse instead of one.

yet return value described as
dxyMillimeters forward distance traveled, in millimeters

As far as I understand, rotation is also doubled, but I'm not sure.
Maybe CoreSLAM uses doubled value, maybe degrees should be halved, maybe it's just error, I don't know. So, why?

All the links under pydoc breezyslam section are dead

all links marked in bold hereafter

or check out the online documentation. By using the component classes Map, Scan, and Position and the distanceScanToMap() method, you can develop new algorithms and particle filters of your own.

using kinect instead of lidar?

in your example code you use
lidar = myLidarModel()
and then in the loop:
scan = readLidar()

Any chance for replacing that with calls to kinect depth data?

where is `laser_t` defined?

I have looked through the c and cpp code and can't find the definition for laser_t that you use in your constructor. Also, how does this compile without that definition?

Laser::Laser(
    int scanSize,
    float scanRateHz,
    float detection_angle_degrees,
    float distance_no_detection_mm,
    int detection_margin,
    float offset_mm
    )
{    
    this->laser = new laser_t;
    
    this->laser->scan_size = scanSize;
    this->laser->scan_rate_hz = scanRateHz;
    this->laser->detection_angle_degrees = detection_angle_degrees;
    this->laser->distance_no_detection_mm = distance_no_detection_mm;
    this->laser->detection_margin = detection_margin;
    this->laser->offset_mm = offset_mm;
}

[Python] Localization mode

Hi,

I have been testing breezyslam on loaded map and vehicle image not re-positioning in map. It starts from center screen.
I am using set_map and should_update_map to False.
Why this happens?

I am not using odometry, only LIDAR data.

Regards.

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

RPLidar scan data is rendered counterclockwise, while LIDAR unit spins clockwise

I'm using the SLAMTEC A1M8 LIDAR unit.
The example "rpslam.py" map is inverted on the Y axis of the robot.
It appears the scans are being drawn in a counterclockwise direction instead of clockwise.
If i hold the LIDAR unit upside down so the laser unit rotation is counterclockwise it correctly matches whats represented on the screen.

Is there a way to change the scan rotation direction inside the BreezySLAM algorhythm?

Raspberry Pi ARM V6

Hi,

do you think there is a chance thy python SLAM runs on a raspberry pi?

Robert

About setmap() function error

Hi, Simon :
I have the same issue with "#17".
But when I use the function setmap(). ex: slam.setmap(mapbytes)
The following error appeared:


File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 130, in setmap
self.map.set(mapbytes)
AttributeError: 'pybreezyslam.Map' object has no attribute 'set'

It seems cannot find pybreezyslam.Map.set().
Did I have a wrong usage?
Thank you!

_run:_get_scan: echo of the command does not match (line @1):

Environment

  • Using LiDAR URG-04LX (Hokuyo Automatic Co.,Ltd.)
  • Python 2.7.6
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty
$ uname -a
Linux mycomputer 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Error

The application opens for a few seconds and starts building the image, then it crashes ...
This happens rather randomly from a user perspective, sometimes the app lives several minutes before a crash

$ ./BreezySLAM/examples/urgslam.py
init done 
opengl support available 
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run: _confirm_scan: response does not match the echo of the command (line 1)
_run:_get_scan:  could not confirm scan!
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  response does not match (line @2):
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  response does not match (line @2):
_run:_find_packet_start: not connected to the sensor!
Traceback (most recent call last):
  File "./BreezySLAM/examples/urgslam.py", line 53, in <module>
    slam.update(lidar.getScan())
  File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 254, in update
    CoreSLAM.update(self, scan_mm, velocities)    
  File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 104, in update
    self._scan_update(self.scan_for_mapbuild, scans_mm)
  File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 136, in _scan_update
    scan.update(scans_mm=lidar, hole_width_mm=self.hole_width_mm, velocities=self.velocities)
TypeError: Wrong/insufficient arguments passed to Scan.update(): lidar size mismatch
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!
_run:_get_scan:  echo of the command does not match (line @1):
_run:_find_packet_start: not connected to the sensor!

another try gave me this

init done 
opengl support available 
Traceback (most recent call last):
  File "./BreezySLAM/examples/urgslam.py", line 53, in <module>
_run:_get_scan:  echo of the command does not match (line @1):
    slam.update(lidar.getScan())
_run:_find_packet_start: not connected to the sensor!
  File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 254, in update
    CoreSLAM.update(self, scan_mm, velocities)    
_run:_get_scan:  echo of the command does not match (line @1):
  File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 104, in update
_run:_find_packet_start: not connected to the sensor!
    self._scan_update(self.scan_for_mapbuild, scans_mm)
  File "/usr/local/lib/python2.7/dist-packages/breezyslam/algorithms.py", line 136, in _scan_update
    scan.update(scans_mm=lidar, hole_width_mm=self.hole_width_mm, velocities=self.velocities)
TypeError: Wrong/insufficient arguments passed to Scan.update(): lidar size mismatch

May be an error that we could catch somewhere? would that be in the Python code?

data representation

I have been going through the python code, it is a little bit unclear how your code [ the update() method] expects the scan data to be represented. taking a look at the exp1.dat, exp2.dat, log2pgm.py and mines.py it seems you don't take into consideration the value of the angle returned by the encoder of the lidar, could you clarify this point ?

Moreover, if we take a look at this:

scan = readLidar()
slam.update(scan)
x, y, theta = slam.getpos(scan)
slam.getmap(mapbytes)

if we make a send a scan to the update() method and wait till we get the result at the end of the slam.getmap(mapbytes) wouldn't we lose some data in the mean time being measured by the lidar ?

C++ source not buildable

First off, thanks for putting this online! Looking forward to experimenting with SLAM using my new lidar.

I'm seeing some issues when trying to build the C++ code.

First off, there are two constructors for the Laser class- one in the header and one implementation file. This causes a redeclaration error. The second issue I've noticed is that the Laser class is looking for a 'laser_t' struct which appears to be the 'scan_t' struct in coreslam.h.

Thanks.

Using a previously generated map for localization (Python)

I would like to use BreezySLAM for localization (no mapping) in a known map.
In python, the the algorithm classes have the getmap(mapbytes) method which returns a bytearray with the map, but it seems there is no way to do the opposite (set the map to a bytearray).
Once the map is set, I would also like to be able to localize in the map without modifying the map, but I can't find a way to do this either.

disappeared wall

Hello
I tried to build a map and noticed one flaw. If the wall is almost parallel to the rays of lidar, then it is practically not displayed on the map. If the review of this wall also closes the obstacle, then wall will disappear from the map and this makes navigation very difficult.
Is there a way to fix this?
Thanks for attention.

Matlab Breezyslam

Hello,
when running the matlab logdemo.m file I receive this error (MATLAB has encountered an internal problem and needs to close)

Could you please point out what might be the problem ?

it is very weird because this is the first time I get such an error!

use option -std=c99 or -std=gnu99 to compile your code

Getting the follow issue while compiling on Ubuntu 14.04

root@qb57:~/BreezySLAM/python# sudo python setup.py install;
running install
running build
running build_py
copying breezyslam/sensors.py -> build/lib.linux-x86_64-2.7/breezyslam
copying breezyslam/__init__.py -> build/lib.linux-x86_64-2.7/breezyslam
copying breezyslam/vehicles.py -> build/lib.linux-x86_64-2.7/breezyslam
copying breezyslam/algorithms.py -> build/lib.linux-x86_64-2.7/breezyslam
running build_ext
building 'pybreezyslam' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pybreezyslam.c -o build/temp.linux-x86_64-2.7/pybreezyslam.o
pybreezyslam.c: In function 'Scan_update':
pybreezyslam.c:312:9: error: 'for' loop initial declarations are only allowed in C99 mode
         for (int k=0; k<PyList_Size(py_scan_angles_degrees); ++k)
         ^
pybreezyslam.c:312:9: note: use option -std=c99 or -std=gnu99 to compile your code
pybreezyslam.c:348:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int k=0; k<PyList_Size(py_lidar); ++k)
     ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Found this thread on stackoverflow

may be that helps resolving.

Question - Getting error; almost have Python version bulding for Windows

Hello,

Almost have python version building for windows, and when I get the details squared away can post those as it is a little bit easier than in the past for building packages with dependencies.

However, I am right now getting the following errors towards the end of the build.

Any help/pointers you can give? Hopefully is something really easy.

build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xae): undefined reference to _imp__Py_BuildValue' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xc1): undefined reference to _imp__PyObject_CallObject'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x110): undefined reference to _imp__PyArg_ParseTuple' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x16d): undefined reference to _imp__PyUnicodeUCS2_FromString'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x233): undefined reference to _imp__PyArg_ParseTuple' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x314): undefined reference to _imp__Py_BuildValue'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x327): undefined reference to _imp__PyObject_CallObject' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x3ba): undefined reference to _imp__PyArg_ParseTupleAndKeywords'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x572): undefined reference to _imp__PyArg_ParseTupleAndKeywords' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x5c6): undefined reference to _imp__PyList_Size'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x609): undefined reference to _imp__PyList_GetItem' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x6b8): undefined reference to _imp__PyFloat_AsDouble'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x6f1): undefined reference to _imp___Py_NoneStruct' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x749): undefined reference to _imp__PyUnicodeUCS2_FromString'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x797): undefined reference to _imp__PyByteArray_Type' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x79f): undefined reference to _imp__PyByteArray_Type'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x7ac): undefined reference to _imp__PyType_IsSubtype' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x7d3): undefined reference to _imp__PyByteArray_Type'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x7db): undefined reference to _imp__PyByteArray_Type' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x7e8): undefined reference to _imp__PyType_IsSubtype'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x87e): undefined reference to _imp__PyArg_ParseTupleAndKeywords' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x8df): undefined reference to _imp__PyByteArray_AsString'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x927): undefined reference to _imp__PyArg_ParseTuple' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x95b): undefined reference to _imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x96d): undefined reference to _imp__PyByteArray_AsString' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x981): undefined reference to _imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0x9f1): undefined reference to _imp__PyUnicodeUCS2_FromString' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xa3d): undefined reference to _imp__PyArg_ParseTuple'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xae5): undefined reference to _imp__PyArg_ParseTuple' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xbfd): undefined reference to _imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xc4e): undefined reference to _imp__PyArg_ParseTuple' build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xd9a): undefined reference to _imp__PyLong_FromLong'
build\temp.win-amd64-2.7\Release\pybreezyslam.o:pybreezyslam.c:(.text+0xe23): undefined reference to _imp__Py_InitModule4' build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x48): undefined reference to _imp__PyExc_TypeError'
build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x53): undefined reference to _imp__PyErr_SetString' build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0xe3): undefined reference to _imp__PyType_Ready'
build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x10f): undefined reference to _imp__PyModule_AddObject' build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x12b): undefined reference to _imp__PyTuple_GetItem'
build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x13d): undefined reference to _imp__PyFloat_AsDouble' build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x149): undefined reference to _imp__PyErr_Occurred'
build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x16f): undefined reference to _imp__PyObject_GetAttrString' build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x181): undefined reference to _imp__PyFloat_AsDouble'
build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x1aa): undefined reference to _imp__PyObject_GetAttrString' build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x1bc): undefined reference to _imp__PyLong_AsLong'
build\temp.win-amd64-2.7\Release\pyextension_utils.o:pyextension_utils.c:(.text+0x1fb): undefined reference to `_imp__PyType_IsSubtype'

How can I create exp1.dat file using my LIDAR (slamtec)

Hi,
Can you please help to get the answer for following questions.

  1. How can I create exp1.dat file using my slamtec LIDAR A1?
  2. Is it possible to use this BreezySLAM code + SLAMTEC LIDAR A1 device for robot navigation.
    Have interfaced motors to raspberry pi3 board and connect lidar to USB port, now I would like to move the robot inside the room for navigation.
    can you please provide some insights on this as I am newbie for this system.
    Thanks for the help.

C++ Demo Examples not working

I have cd to BreezySLAM/cpp, and do 'sudo make install'. But when I then cd to BreezySLAM/examples and do 'make cpptest', (I have correctly set the LIBDIR paths in both cpp and examples folder's makefiles)I got error as shown in snap.
demo_compilation_issue

Can you give me some suggestion? Thanks in advance!

missing routine

the routine distance_scan_to_map is defined in coreslam.h but the routine is missing in coreslam.c

Black plt screen

Hi. I am having weird trouble with rpslam.py. When I open it I see only black area with red arrow in it. The positioning seems to be working (arrow moves), but I can't see any walls, nothing. This problem was rare at the beggining, usually everything worked. But suddedly no more. I reinstalled most of libraries, even installed fresh new distro( I'm using PC with Mint.), but problem remained same. Also, I changed 'distances.copy()' and 'angles.copy()' to ones without '.copy()' because of an error ''list' object has no attribute 'copy'' (but for python3 I didn't change it but it then shows another error:'Too many measurments in the input buffer: 542/500. Clearing buffer...' and also shows black screen). I would be very happy if someone could help me with this. Thank you.

number of samples with RP Lidar A2

I have been experimenting with RP Lidar A2 and with the default settings of 200 and 250 samples (minimum samples for updating the map) I do not get any map built. If I lower the rate to 50 or 100 I get something really fussy and not really good.
Is this problem with python interface or could it be hardware problem?
Currently the Lidar is connected over USB port.

roboviz

pi@raspberrypi:~/playgrounds/BreezySLAM/examples $ python3 rpslam.py
Traceback (most recent call last):
File "rpslam.py", line 35, in
from roboviz import MapVisualizer
ModuleNotFoundError: No module named 'roboviz'

Mapping is nothing like example

I can't get mapping to work as it looks in main page's image. Mine always gets blurry and shadowy when I move to other room. Only current one looks fine.
slam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.