Comments (9)
@danil-tolkachev Thank you for your solution. It seems that the result of visualization is correct.
from ros-bridge.
You just need to set Decay Time
to 0.
from ros-bridge.
@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?
from ros-bridge.
It's another problem. Try changing fps of simulation
./CarlaUE4.sh -benchmark -fps=10
from ros-bridge.
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.
@atinfinity
Hi,
I have a problem, please check this for me
from ros-bridge.
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
from ros-bridge.
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.
@gnykumar Thank you for your proposal! I'll try this proposal.
from ros-bridge.
Related Issues (20)
- How does CARLA server transmit simulation data through the TCP Socket to ROS? HOT 1
- Missing 0.9.13 Tag
- ROS2 😿[ERROR] [bridge-1]: process has died😿 HOT 2
- Linker error librviz_carla_plugin.so: undefined symbol: fromMsg HOT 2
- My ROS system is ROS2 foxy, but there was an error compiling ROS bridge on Ubuntu 20. I don't know how to solve it HOT 8
- About origin of spawn_point
- Lidar sensor doesn't recognize map made by RoadRunner HOT 2
- Unable to record any carla_msgs HOT 1
- Use_sim_time HOT 1
- AttributeError: 'float' object has no attribute 'arctan2'
- [bridge-1] ModuleNotFoundError: No module named 'rclpy._rclpy'
- Argument list too long on build
- Rosbag replay error
- Map imports are inconsistent
- The frequency of the ros topic about the vehicle status sent by carla is too low
- Running ros-bridge.launch encounters errors. HOT 1
- I install and run the Tutorial but am HOT 1
- Replace vehicle dynamics?
- colcon error casued by the lack of dependence `tf2_eigen`
- ros-bridge couldn't fit into the latest CARLA HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ros-bridge.