GithubHelp home page GithubHelp logo

leddarsdk's Introduction

LeddarSDK

LeddarSDK is c++ cross-platform SDK that allows you to connect to LeddarTech sensors.
Online documentation can be found here

1 - Content Description

=======================

./LeddarSDK.chm                     Documentation generated by Doxygen  
./libs                              3rd party libs needed by the SDK  
./src/shared                        Structures used by the communication classes  
./src/Leddar                        Sensors classes  
./src/LeddarTech                    Utilities
./src/LeddarExample                 Example using LeddarSDK  
./src/LeddarPy                      Python wrapper package
./src/Leddar_ROS                    ROS package

2 - Compiling LeddarSDK

=======================

Build process uses cmake (https://cmake.org). The CMakeLists.txt file is in src folder. It is recommended to do an out of source build in the folder src/release

You can choose for what sensor to build the sdk using cmake project configuration. All sensors are enabled by default.

Generic method

To build the LeddarSDK using CMakeList.txt, as mentionned above we recommand an out of source build, in the folder src/release

cd "LEDDARSDK_INSTALLATION_PATH"/src
mkdir release
cd release
cmake ..
make

The LeddarExample will be the available in the release folder. See below to run the example.

Note : you might need to install additional library. For example libusbx-devel on fedora or libusb-1.0-0-dev on debian

Directly from visual studio

CMake is directly integrated in visual studio, you can check the documentation here

3 - Running LeddarExample

=========================

Linux example

USB and Serial:

You need to give user rights to the USB port or run the example using the "sudo" command.

To change USB access, create a file in /etc/udev/rules.d, for example 90-LeddarTech.rules and add this line: ATTRS{idVendor}=="28f1",MODE="0666"

SPI using FTDI cable:

You need to give user rights to the USB port:

To change USB access, create a file in /etc/udev/rules.d, for example 91-FTDI-SPI.rules and add this line: ATTRS{idVendor}=="0403",MODE="0666"

To access the device, you need to run first these command provided by the FTDI documentation: sudo rmmod ftdi_sio and sudo rmmod usbserial

In order to run the example for the Vu8 SPI sensor, you need to run it with the following command (with the correct PATHTO and architecture (x64, x86 or ARM):
One liner: LD_LIBRARY_PATH="/PATHTO/LeddarSDK/libs/FTDI/linux/x64:/PATHTO/LeddarSDK/libs/MPSSE/linux/x64" ./LeddarExample

Or in multiple lines:

export LD_LIBRARY_PATH="/PATHTO/LeddarSDK/libs/FTDI/linux/x64:/PATHTO/LeddarSDK/libs/MPSSE/linux/x64"
./LeddarExample

4 - Python Package

==================
First you need to build the SDK using instructions found at step 2 - Compiling LeddarSDK

This step suppose you have built the sdk in the "release" folder. If your build folder is different, you need to update the path in the setup.py script (line with library_dirs = ['../release'])

Directly into cmake

You can build the LeddarPy library using cmake, but python needs to be in the path, you cannot choose what python version to use and you cannot install leddarPy into your python.

  • On Windows, it will create LeddarPy.dll that need to be renamed leddar.pyd
  • On Linux, it will create LeddarPy.so that need to be renamed leddar.so

Linux python

In folder LeddarPy run python setup.py install --user

Windows python

Depending on your python version and visual studio version, python setup.py install can work (see https://wiki.python.org/moin/WindowsCompilers/). Be carefull, if you used cmake directly in visual studio, you have to update setup.py with the correct path (line with library_dirs = ['../release'])

Else you have to use cmake

5 - ROS package

==================
We provide a ROS (https://www.ros.org/) package that uses our python package. Instructions can be found in the Leddar_ROS folder.

leddarsdk's People

Contributors

davidlevy-leddartech avatar julienstanguennec-leddartech avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

leddarsdk's Issues

LeddarExample throwing Exception

Hey!
I have the Vu8 sensor connected to a Raspberry Pi 3B+ with the included FTDI cable.
Followed the steps to build and run the LeddarExample.
After running the example and pressing 1 to read data the cli stops up after a few seconds and throws this exception:
CRC error on transaction. Read address_ 0x0x480000 size_ 1 or CRC error on transaction. Read address_ 0x0x50000c size_ 96

Is this because the Pi is not fully compatible with the SPI connection?

If the above is solvable I have another issue.
I'm planning on using python in the project I'm doing. But when I'm trying to run the Python example it cant find the leddar module. I've run the setup as described, on all versions of python installed on the Pi

Any help would be appreciated

Regards Odd

Leddar Pixell

I am intending to purchase some Leddar Pixells to try and implement in my robot for ros, may i know if i can get the pointcloud data from the Leddar pixell using this Leddar_ros launch?

LeddarSDK/src/Leddar_ROS

I received the Leddar Vu8's data using Leddar_ROS SDK.

The data is received well, but data updated by 1 Hz.

I want to up the receiving frequency.

How can I this?

Ros2 Packages

hello everybody,

I'm searching about LiDar sensors and analyzing cloud points on ROS2.
is there any ROS2- package available for this sensor?

I really appreciate any help you can provide.

Not Found: LeddarConfigurator4.lib

While trying to run LeddarPy.sln in the SDK, I am having this error:
LNK1181: cannot open input file '..\LeddarConfigurator4\x64\Release\LeddarConfigurator4.lib'
There is no directory named x64 in LeddarConfigurator4 in the project.
Why am I getting this error? and any pointers on how to solve it?
image

Module has no attribute called Device

There is a problem in the devices.py file, where the module 'leddar' doesn't have a class called 'Device'. I have followed the complete readme and reistalled the python packages. I ran the example.launch file. Here is the output:

$ roslaunch leddar_ros example.launch param1:=AK14050 device_type:=M16                                                                                      

... logging to /home/zohar/.ros/log/297067cc-2274-11ea-9f34-3c9509b24e2d/roslaunch-Bunnker-3808.log
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 http://Bunnker:46177/

SUMMARY
========

PARAMETERS
 * /LeddarTech_1/sensor/device_type: M16
 * /LeddarTech_1/sensor/frame_id: sensor_frame
 * /LeddarTech_1/sensor/param1: AK14050
 * /LeddarTech_1/sensor/param3: 0
 * /LeddarTech_1/sensor/param4: 0
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES
  /LeddarTech_1/
    leddar_1_to_map (tf/static_transform_publisher)
    sensor (leddar_ros/device.py)
  /
    rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [3819]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 297067cc-2274-11ea-9f34-3c9509b24e2d
process[rosout-1]: started with pid [3830]
started core service [/rosout]
process[LeddarTech_1/sensor-2]: started with pid [3833]
process[LeddarTech_1/leddar_1_to_map-3]: started with pid [3834]
process[rviz-4]: started with pid [3840]
[ INFO] [1576769291.968983818]: rviz version 1.13.5
[ INFO] [1576769291.969128917]: compiled against Qt version 5.9.5
[ INFO] [1576769291.969172033]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1576769292.002992071]: Forcing OpenGl version 0.
[ INFO] [1576769292.790506010]: Stereo is NOT SUPPORTED
[ INFO] [1576769292.790731038]: OpenGl version: 4.5 (GLSL 4.5).
Traceback (most recent call last):
  File "/home/zohar/Documents/Work/ACR/rossystem/src/leddar_ros/scripts/device.py", line 39, in <module>
    dev = leddar.Device()
AttributeError: 'module' object has no attribute 'Device'
[LeddarTech_1/sensor-2] process has died [pid 3833, exit code 1, cmd /home/zohar/Documents/Work/ACR/rossystem/src/leddar_ros/scripts/device.py __name:=sensor __log:=/home/zohar/.ros/log/297067cc-2274-11ea-9f34-3c9509b24e2d/LeddarTech_1-sensor-2.log].
log file: /home/zohar/.ros/log/297067cc-2274-11ea-9f34-3c9509b24e2d/LeddarTech_1-sensor-2*.log

I think the problem lies with python not recognizing the module, but I'm not sure why that would be the case, since the other installed modules work just fine. I hope you could help me figure out what the problem is, or in what direction to look for answers.
Thanks in advance!

Leddar M16 ROS Launch Problem

The output of: roslaunch leddar_ros example.launch param1:=AK47035 device_type:=M16

... logging to /home/kvyn/.ros/log/1968fc34-fa26-11e9-8665-80a58978f877/roslaunch-Kvyn-10350.log
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 http://Kvyn:42203/

SUMMARY

PARAMETERS

  • /LeddarTech_1/sensor/device_type: M16
  • /LeddarTech_1/sensor/frame_id: sensor_frame
  • /LeddarTech_1/sensor/param1: AK47035
  • /LeddarTech_1/sensor/param3: 0
  • /LeddarTech_1/sensor/param4: 0
  • /rosdistro: melodic
  • /rosversion: 1.14.3

NODES
/LeddarTech_1/
leddar_1_to_map (tf/static_transform_publisher)
sensor (leddar_ros/device.py)
/
rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [10360]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 1968fc34-fa26-11e9-8665-80a58978f877
process[rosout-1]: started with pid [10371]
started core service [/rosout]
process[LeddarTech_1/sensor-2]: started with pid [10377]
process[LeddarTech_1/leddar_1_to_map-3]: started with pid [10379]
process[rviz-4]: started with pid [10380]
[ INFO] [1572337716.147842922]: rviz version 1.13.4
[ INFO] [1572337716.147885644]: compiled against Qt version 5.9.5
[ INFO] [1572337716.147898850]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1572337716.151850532]: Forcing OpenGl version 0.
[ INFO] [1572337716.461546721]: Stereo is NOT SUPPORTED
[ INFO] [1572337716.461673450]: OpenGl version: 3 (GLSL 1.3).
[ERROR] [1572337716.600246]: Error connecting to device type M16 with connection info AK47035/0/0.
Traceback (most recent call last):
File "/home/kvyn/catkin_ws/src/leddar_ros/scripts/device.py", line 57, in
raise RuntimeError(err_msg)
RuntimeError: Error connecting to device type M16 with connection info AK47035/0/0.
[LeddarTech_1/sensor-2] process has died [pid 10377, exit code 1, cmd /home/kvyn/catkin_ws/src/leddar_ros/scripts/device.py __name:=sensor __log:=/home/kvyn/.ros/log/1968fc34-fa26-11e9-8665-80a58978f877/LeddarTech_1-sensor-2.log].
log file: /home/kvyn/.ros/log/1968fc34-fa26-11e9-8665-80a58978f877/LeddarTech_1-sensor-2
.log
*

Is the param1 and device type wrong? If yes, what is the correct value for param1 and device type

LeddarOne UART Speed too low

Hi,

I am using the LeddarOne using the LeddarSDK. I am using a usb to uart converter to interface with the sensor. I was able to receive data both using the LeddarExample based on SDK 4.3.0.107 script and then the a separate python script using the python SDK.

But in both cases the refresh rate was only around 8Hz. But this spec document mentions a data refresh rate of upto 140Hz. How can I increase the refresh rate to 140Hz?

ROS Package - Vu8 - Serial - USB communication problem

I am launching ROS package provided by you but during communication, I am getting a connection issue in it. Is there any specific format required for serial no. or something else.

I provided the following command:
roslaunch leddar_ros example.launch param1:=DI3500207 device_type:=Vu8

then I get this error

process[rviz-3]: started with pid [29562]
[ INFO] [1561096376.293109957]: rviz version 1.12.17
[ INFO] [1561096376.293170633]: compiled against Qt version 5.5.1
[ INFO] [1561096376.293177437]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1561096376.407115703]: Stereo is NOT SUPPORTED
[ INFO] [1561096376.407187344]: OpenGl version: 3 (GLSL 1.3).
[ERROR] [1561096376.604497]: Error connecting to device type Vu8 with connection info DI3500207/0/0.
Traceback (most recent call last):
File "/home//catkin_ws/src/leddar_ros/scripts/device.py", line 57, in
raise RuntimeError(err_msg)
RuntimeError: Error connecting to device type Vu8 with connection info DI3500207/0/0.

Connecting with Leddar Vu8 using USB

Hello
I have a Vu8 and I bought a USB type-A cable to connect it with the USB hub on my board(Jetson TX2). The problem comes when I run the python example of LeddarPy package.
As is clear from the code, direct USB connection is not supported by the SDK for Vu8. How do I connect with serial modbus using the USB cable as I don't have a serial port on the board?
If this is not possible, how can I connect it alternatively? Please provide a detailed procedure preferably using the USB cable as a serial modbus connection.

Error Runing Leddar Example - ROS Kineitc

Good Morning,
I'm facing the following issue and hopping that someone knows whats happening I'm posting it here.
I'm working with Ubuntu 16.04 LTS and ROS kinetic.

All my ROS packages have compiled successfully and to the extent of my knowledge I have implemented all the steps that are in the Leddar_ROS README file inside the LeddarSDK. This error appears with and without the LIDAR connected via USB. The rules for reading the LIDAR seem to be implemented correctly. Rviz opens but does not present anything.

The following lines contain the roslaunch call and the error.

Thanks a lot!

ERROR:

ImportError: /home/marcel/.python-eggs/leddar-1.0-py2.7-linux-x86_64.egg-tmp/leddar.so: undefined symbol: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev
[LeddarTech_1/sensor-2] process has died [pid 3611, exit code 1, cmd /home/marcel/catkin_ws/src/leddar_ros/scripts/device.py __name:=sensor __log:=/home/marcel/.ros/log/c3cf0a04-9202-11eb-9415-00215de11b04/LeddarTech_1-sensor-2.log].
log file: /home/marcel/.ros/log/c3cf0a04-9202-11eb-9415-00215de11b04/LeddarTech_1-sensor-2*.log


marcel@v:~/catkin_ws$ roslaunch leddar_ros example.launch param1:=AK43004 device_type:=Vu8

... logging to /home/marcel/.ros/log/c3cf0a04-9202-11eb-9415-00215de11b04/roslaunch-v-3585.log
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 http://localhost:42139/

SUMMARY

PARAMETERS

  • /LeddarTech_1/sensor/device_type: Vu8
  • /LeddarTech_1/sensor/frame_id: sensor_frame
  • /LeddarTech_1/sensor/param1: AK43004
  • /LeddarTech_1/sensor/param3: 0
  • /LeddarTech_1/sensor/param4: 0
  • /rosdistro: kinetic
  • /rosversion: 1.12.17

NODES
/LeddarTech_1/
leddar_1_to_map (tf/static_transform_publisher)
sensor (leddar_ros/device.py)
/
rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [3595]
ROS_MASTER_URI=http://localhost:1131

setting /run_id to c3cf0a04-9202-11eb-9415-00215de11b04
process[rosout-1]: started with pid [3608]
started core service [/rosout]
process[LeddarTech_1/sensor-2]: started with pid [3611]
process[LeddarTech_1/leddar_1_to_map-3]: started with pid [3626]
process[rviz-4]: started with pid [3637]
[ INFO] [1617182616.750832872]: rviz version 1.12.17
[ INFO] [1617182616.751343270]: compiled against Qt version 5.5.1
[ INFO] [1617182616.751639465]: compiled against OGRE version 1.9.0 (Ghadamon)
Traceback (most recent call last):
File "/home/marcel/catkin_ws/src/leddar_ros/scripts/device.py", line 3, in
import leddar
File "build/bdist.linux-x86_64/egg/leddar.py", line 7, in
File "build/bdist.linux-x86_64/egg/leddar.py", line 6, in bootstrap
ImportError: /home/marcel/.python-eggs/leddar-1.0-py2.7-linux-x86_64.egg-tmp/leddar.so: undefined symbol: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev
[LeddarTech_1/sensor-2] process has died [pid 3611, exit code 1, cmd /home/marcel/catkin_ws/src/leddar_ros/scripts/device.py __name:=sensor __log:=/home/marcel/.ros/log/c3cf0a04-9202-11eb-9415-00215de11b04/LeddarTech_1-sensor-2.log].
log file: /home/marcel/.ros/log/c3cf0a04-9202-11eb-9415-00215de11b04/LeddarTech_1-sensor-2*.log
[ INFO] [1617182617.189895897]: Stereo is NOT SUPPORTED
[ INFO] [1617182617.190316899]: OpenGl version: 2.1 (GLSL 1.2).

LdObject disconnect fails for duplicate connections

Hi,

thank you for supplying the SDK. I'm currently exploring it. I think found an issue with LdObject's connection functionality.

I was testing the correct disconnect of duplicate connections. It seems duplicate connections that got created one after each other are not disconnected properly. I suspect the increment of lIter on line 82 of LdObject.cpp is to blame. The next element in the list is skipped because this leads to a double increment with the increment in the for loop.

A sample I created here: https://github.com/markuspg/LeddarSDK/blob/disconnectIssueSample/tests/LeddarTest/main.cpp

Perhaps a workaround would be to decrement lIter in line 82 instead?

Best,
markuspg

Error on modbus modbus_receive_raw_confirmation_timeoutEnd

I am witnessing timeout exceptions using the latest SDK with 3 Vu8 devices connected over modbus. I used the LeddarExample sample application to "share" the serial connection with the 2 other sibling modbus connections. Note: when I use each sensor on its own I do not encounter the modbus timeout exception.

I start off receiving data from all 3 sensors, but over a variable period of time, I receive the timeout exception: "Error on modbus modbus_receive_raw_confirmation_timeoutEnd in ReceiveRawConfirmation (-1)." I am able to try-catch the exception and resume, but of course this impacts the desired data rate.

I am trying to acquire data at around 4-10 Hz. It doesn't really change the outcome by varying the frequency, I will eventually see the modbus related timeout from the SDK.

When I connect my Vu8 sensors to the Configuration app, it does notify me of an available firmware update. Could this be the source of my timeout issue, using an older Vu8 firmware? I didn't want to blindly upgrade until I have exhausted all other options and insight.

Thank you for any assistance you can provide.

...I forgot to mention that the LeddarExample executable in the SDK behaves the same way using Vu8 mobus serial connection. This sample allows you to specify two sensor addresses and eventually the reading of data ends with the same timeout.

Couldnt load CAN-komodo library

When I try to use the LeaddarExample executable after connecting with CAN, I get the following error: Exception: Couldnt load CAN-komodo library. Is there a library a should install?

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.