Giter Site home page Giter Site logo

Comments (4)

grassjelly avatar grassjelly commented on June 8, 2024

Hi,
Can you share your edited launch file please?

Meanwhile, try doing the following:

  1. Drag your sweep launch file here:https://github.com/linorobot/linorobot/tree/master/launch/include/lidar

  2. Define your LIDAR's transform here: https://github.com/linorobot/linorobot/tree/master/launch/include/lidar

  3. Run:
    export LINOLIDAR=<name of your launchfile>

Once this is done, you can run Linorobot as per normal.

from linorobot.

valentinpatrascu avatar valentinpatrascu commented on June 8, 2024

Hi,

Sorry for late response. I configured the environment as you said but the error still occurs.
These are the launch files.

../linorobot/launch/include/laser.launch

<launch>
    <!-- Run Linorobot compatible laser drivers. Takes reference from env var LINOLIDAR. ie. export LINOLIDAR=xv11 -->
    <include file="$(find linorobot)/launch/include/lidar/sweep.launch" />
    <!-- Publish static transform of the laser. Define your sensor offset here -->
    <node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_laser" args="0.065 0 0.098 0 0 0  /base_link /laser"/>
</launch>

../linorobot/launch/include/lidar/sweep.launch (here I added the conversion between pc2 and laserscan)

<launch>
    <!-- run sweep_node node -->
    <node name="sweep_node"          pkg="sweep_ros"  type="sweep_node" output="screen">
            <param name="serial_port"         type="string" value="/dev/linolidar"/>
            <param name="serial_baudrate"     type="int"    value="115200"/>
            <param name="frame_id"            type="string" value="laser"/>
    </node>

    <!-- run pointcloud_to_laserscan node -->
    <node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">

        <remap from="cloud_in" to="pc2"/>
        <rosparam>
            target_frame: laser # Leave disabled to output scan in pointcloud frame
            transform_tolerance: 0.001
            min_height: -1.0
            max_height: 1.0

            angle_min: -3.14 # -M_PI/2
            angle_max: 3.14 # M_PI/2
            angle_increment: 0.0174533 # M_PI/360.0
            scan_time: 0.1
            range_min: 0.0
            range_max: 40.0
            use_inf: true

            # Concurrency level, affects number of pointclouds queued for processing and number of threads used
            # 0 : Detect number of cores
            # 1 : Single threaded
            # 2->inf : Parallelism level
            concurrency_level: 1
        </rosparam>
    </node>
</launch>

from linorobot.

grassjelly avatar grassjelly commented on June 8, 2024

Your launch files looks good. Just omit the pointcloud_to_laserscan.

Also make sure that sweep publishes that data in "laser" frame. Otherwise, you have to rename "laser" in static_transform_publisher to the correct frame the LIDAR is using.

from linorobot.

valentinpatrascu avatar valentinpatrascu commented on June 8, 2024

The problem was not the lidar itself, it worked well, but the udev rules that i've manually created. I observed that each time when I plugged in a new lino device (LiDAR / Arduino Mega) each device was bound on the same ttyUSB* port.

So, I followed the #31 (comment) instructions to configure the libgudev on my ubuntu 18.04, and after the port configurations provided by the lino_udev script, I still had to manually configure the port for Arduino Mega.

But it works now, thank you!

from linorobot.

Related Issues (20)

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.