Giter Site home page Giter Site logo

Comments (9)

atinfinity avatar atinfinity commented on August 20, 2024 1

@danil-tolkachev Thank you for your solution. It seems that the result of visualization is correct.

from ros-bridge.

danil-tolkachev avatar danil-tolkachev commented on August 20, 2024

You just need to set Decay Time to 0.

from ros-bridge.

atinfinity avatar atinfinity commented on August 20, 2024

@danil-tolkachev Thank you for your comment. A part of LiDAR points was drawn when I set Decay Time to 0. Is this correct behavior as LiDAR simulation?

screenshot from 2019-01-17 06-58-42

from ros-bridge.

danil-tolkachev avatar danil-tolkachev commented on August 20, 2024

It's another problem. Try changing fps of simulation

./CarlaUE4.sh -benchmark -fps=10

from ros-bridge.

gnykumar avatar gnykumar commented on August 20, 2024

Hi,

I am trying same above steps with 0.9.2 version(pre compiled)

I am able to run it.

But while running I get below errors
For python manual_control.py

Traceback (most recent call last):
  File "manual_control.py", line 590, in <lambda>
    self.sensor.listen(lambda image: CameraManager._parse_image(weak_self, image))
  File "manual_control.py", line 630, in _parse_image
    self._surface = pygame.surfarray.make_surface(array.swapaxes(0, 1))
  File "/usr/lib/python2.7/dist-packages/pygame/surfarray.py", line 243, in make_surface
    return numpysf.make_surface (array)
  File "/usr/lib/python2.7/dist-packages/pygame/_numpysurfarray.py", line 368, in make_surface
    blit_array (surface, array)
  File "/usr/lib/python2.7/dist-packages/pygame/_numpysurfarray.py", line 437, in blit_array
    surface.get_buffer ().write (data, 0)
IndexError: bytes to write exceed buffer size

And
For
roslaunch carla_ros_bridge client_with_rvizaunch.launch

[INFO] [1550728939.884117, 49.285821]: Reconfigure Request:  speed (0.05, 0.0, 0.5),accel (0.02, 0.0, 0.05),
Traceback (most recent call last):
  File "/home/wipro16/carla_bridge_0.9.2/src/ros-bridge-0.9.2/src/carla_ros_bridge/bridge.py", line 157, in _carla_time_tick
    self.update()
  File "/home/wipro16/carla_bridge_0.9.2/src/ros-bridge-0.9.2/src/carla_ros_bridge/parent.py", line 159, in update
    actor.update()
  File "/home/wipro16/carla_bridge_0.9.2/src/ros-bridge-0.9.2/src/carla_ros_bridge/ego_vehicle.py", line 209, in update
    self.vehicle_control_cycle()
  File "/home/wipro16/carla_bridge_0.9.2/src/ros-bridge-0.9.2/src/carla_ros_bridge/ego_vehicle.py", line 445, in vehicle_control_cycle
    self.run_accel_control_loop()
  File "/home/wipro16/carla_bridge_0.9.2/src/ros-bridge-0.9.2/src/carla_ros_bridge/ego_vehicle.py", line 562, in run_accel_control_loop
    self.info.current.accel)
  File "/home/wipro16/.local/lib/python2.7/site-packages/simple_pid/PID.py", line 91, in __call__
    self._derivative = -self.Kd * d_input / dt
ZeroDivisionError: float division by zero

And I am not able to see any lidar information anywhere.

from ros-bridge.

gnykumar avatar gnykumar commented on August 20, 2024

@atinfinity
Hi,

I have a problem, please check this for me

#52 (comment)

from ros-bridge.

gnykumar avatar gnykumar commented on August 20, 2024

Hi @atinfinity @danil-tolkachev

Thanks both of you, I resolved all those issues.
and able to use bridge with compiled version of carla to get lidar data in ros

But my application is to create 3D map from lidar data in ros, here the data
I am getting is not good to generate because of it's rotation frequency and points per second

Blueprint attribute | Type | Default | Description
-- | -- | -- | --
channels | int | 32 | Number of lasers
range | float | 1000 | Maximum measurement distance in meters
points_per_second | int | 56000 | Points generated by all lasers per second
rotation_frequency | float | 10.0 | Lidar rotation frequency
upper_fov | float | 10.0 | Angle in degrees of the upper most laser
lower_fov | float | -30.0 | Angle in degrees of the lower most laser
sensor_tick | float | 0.0 | Seconds between sensor captures (ticks)

Above this information provided in carla simulator site,
Where I can modify these parameters in Compiled version and in ros bridge.

Below images are 3D map which i tried to build using ros lidar data
screenshot from 2019-03-05 15-30-21
screenshot from 2019-03-05 15-30-23

from ros-bridge.

gnykumar avatar gnykumar commented on August 20, 2024

Hi @atinfinity
@danil-tolkachev

Thanks for all

I found how to make better lidar data out

class CameraManager(object):
    def __init__(self, parent_actor, hud):
        self.sensor = None
        self._surface = None
        self._parent = parent_actor
        self._hud = hud
        self._recording = False
        self._camera_transforms = [
            carla.Transform(carla.Location(x=-5.5, z=2.8), carla.Rotation(pitch=-15)),
            carla.Transform(carla.Location(x=1.6, z=1.7))]
        self._transform_index = 1
        self._sensors = [
            ['sensor.camera.rgb', cc.Raw, 'Camera RGB'],
            ['sensor.camera.depth', cc.Raw, 'Camera Depth (Raw)'],
            ['sensor.camera.depth', cc.Depth, 'Camera Depth (Gray Scale)'],
            ['sensor.camera.depth', cc.LogarithmicDepth, 'Camera Depth (Logarithmic Gray Scale)'],
            ['sensor.camera.semantic_segmentation', cc.Raw, 'Camera Semantic Segmentation (Raw)'],
            ['sensor.camera.semantic_segmentation', cc.CityScapesPalette, 'Camera Semantic Segmentation (CityScapes Palette)'],
            ['sensor.lidar.ray_cast', None, 'Lidar (Ray-Cast)']]
        world = self._parent.get_world()
        bp_library = world.get_blueprint_library()
        for item in self._sensors:
            bp = bp_library.find(item[0])
            if item[0].startswith('sensor.camera'):
                bp.set_attribute('image_size_x', str(hud.dim[0]))
                bp.set_attribute('image_size_y', str(hud.dim[1]))
            elif item[0].startswith('sensor.lidar'):
                bp.set_attribute('range', '5000')
                bp.set_attribute('rotation_frequency', '40')
                bp.set_attribute('channels', '32')
                bp.set_attribute('points_per_second', '500000')
                bp.set_attribute('upper_fov', '30')
                bp.set_attribute('lower_fov', '-15')
                bp.set_attribute('sensor_tick', '0.0')
            item.append(bp)
        self._index = None

Added attributes of lidar as points_per_second, channels and set to better rotation frequency,
I think @atinfinity needs to set more rotation frequency and should make Decay time as 0 in rviz.

from ros-bridge.

atinfinity avatar atinfinity commented on August 20, 2024

@gnykumar Thank you for your proposal! I'll try this proposal.

from ros-bridge.

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.