question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Laser doesn't detect all objects

See original GitHub issue

I notice that the laser does not always detect objects, it detects objects such as duck_vhacd and sphere8cube but not table/table. Any reason for this behaviour? Is this related to the type of object?

PS: If I run the pepper_lasers example and print the value of laser_list, each laser value is always either 0 or 3. When the lasers go on one by one, they are all 0 and if the lasers are all initialized the values are all 3. Maybe better to place the duck in a region where it meets the lasers?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mbusycommented, Jun 22, 2020

Yep that’s what I thought, the table legs are defined from a visual point of view, but not from a collision point of view. The lasers won’t be able to detect them image

1reaction
wagenaartjecommented, Jun 20, 2020

This is the code I am using:

import cv2
import time
import math
import numpy as np
from qibullet import SimulationManager
from qibullet import PepperVirtual

import pybullet
import pybullet_data

def main():
    # Initialize a single simulation
    simulation_manager = SimulationManager()
    client = simulation_manager.launchSimulation(gui=True)

    # Populate the world
    pepper = simulation_manager.spawnPepper(client, spawn_ground_plane=True)
    pybullet.setAdditionalSearchPath(pybullet_data.getDataPath())
    table = pybullet.loadURDF("table/table.urdf",basePosition=[2, 0, -0.05], baseOrientation=[0,0,1,1], globalScaling = 1.0, physicsClientId=client)

    # Initialize the posture
    pepper.goToPosture("Crouch", 0.6)
    time.sleep(1)
    pepper.goToPosture("Stand", 0.6)
    time.sleep(1)
    pepper.goToPosture("StandZero", 0.6)
    time.sleep(1)

    pepper.showLaser(True)
    pepper.subscribeLaser()

    # Start moving
    pepper.moveTo(1, 1, 0, frame=PepperVirtual.FRAME_WORLD, speed=0.1, _async=True)

    try:
        while True:
            # Gather all laser values
            laser_list = pepper.getRightLaserValue()
            laser_list.extend(pepper.getFrontLaserValue())
            laser_list.extend(pepper.getLeftLaserValue())
            print(laser_list)

            cv2.waitKey(1)
    except KeyboardInterrupt:
        simulation_manager.stopSimulation(client)

if __name__ == "__main__":
    main()
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Laser Engraving and Cutting
Cause: While the laser cutter will never convert raster images into vector lines, it can convert vector lines into raster images if the...
Read more >
Light off, spot on: laser sensors for any application | SICK
A further advantage in certain applications is that the laser sensors can detect objects through holes or narrow openings.
Read more >
High-class laser sensors able to detect very small objects
Key moments. View all · Featuring stainless steel enclosure that won't break when bumped during installation or maintenance. · Featuring stainless ...
Read more >
Laser detecting everything instead of target object
The problem I'm encountering is that the laser detects everything as the 'target'. However, it works when I position the laser onto the ......
Read more >
Troubleshooting Guide for Laserbox - xTool
Solution: It means there is no lost step, usually caused by loose lenses. Check the focus lens. 18 Why can't I open the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found