Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lidar data with ros #52

Closed
gnykumar opened this issue Feb 28, 2019 · 9 comments
Closed

Lidar data with ros #52

gnykumar opened this issue Feb 28, 2019 · 9 comments

Comments

@gnykumar
Copy link

#32 (comment)
#34

Hi,
I tried steps mentioned in https://github.com/carla-simulator/ros-bridge
to run ros-bridge with compiled version of carla 0.9.3

But i am not understanding how to add lidar to get lidar point cloud data in ros
and also I am getting below error in ros client_with_rivz.launch terminal
after running manaul.py

[INFO] [1551334494.393631, 260.269848]: 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_ros_ws/src/ros-bridge-0.9.3/src/carla_ros_bridge/bridge.py", line 157, in _carla_time_tick
    self.update()
  File "/home/wipro16/carla_ros_ws/src/ros-bridge-0.9.3/src/carla_ros_bridge/parent.py", line 159, in update
    actor.update()
  File "/home/wipro16/carla_ros_ws/src/ros-bridge-0.9.3/src/carla_ros_bridge/ego_vehicle.py", line 214, in update
    self.vehicle_control_cycle()
  File "/home/wipro16/carla_ros_ws/src/ros-bridge-0.9.3/src/carla_ros_bridge/ego_vehicle.py", line 450, in vehicle_control_cycle
    self.run_accel_control_loop()
  File "/home/wipro16/carla_ros_ws/src/ros-bridge-0.9.3/src/carla_ros_bridge/ego_vehicle.py", line 567, in run_accel_control_loop
    self.info.current.accel)
  File "/home/wipro16/.local/lib/python2.7/site-packages/simple_pid/PID.py", line 104, in __call__
    self._derivative = -self.Kd * d_input / dt
ZeroDivisionError: float division by zero

and I am able run the vehicle after running manual.py but not ros lidar data.
Can someone help Where I am missing!

System : ubuntu 16, ROS Kinetic, python2.7, pip : pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
exported : egg file from pythonAPI before running ros client launch
installed protobuf and simple pid also and libpng16-16

@JustWon
Copy link

JustWon commented Feb 28, 2019

I have a same problem,,

@JustWon
Copy link

JustWon commented Feb 28, 2019

I temporally solved the problem by checking #42.
the simple-pid version 0.1.5 may cause the error.
so I downgraded it to the 0.1.4.

sudo pip install simple-pid==0.1.4

@gnykumar
Copy link
Author

gnykumar commented Mar 1, 2019

I temporally solved the problem by checking #42.
the simple-pid version 0.1.5 may cause the error.
so I downgraded it to the 0.1.4.

sudo pip install simple-pid==0.1.4

@JustWon Thanks, I did same, now Erron is not coming and camera data I am able see using ros bridge, and Further am trying for lidar data, please tell me if any steps i need to follow to get lidar data

@JustWon
Copy link

JustWon commented Mar 1, 2019

you can change the choice of the sensory input by ` key which is beside the the number 1 key.
or you can directly select the lidar input by the number 7 key.

@gnykumar
Copy link
Author

gnykumar commented Mar 1, 2019

@JustWon
Hi JustWon,
Thanks a lot, finally i got it

Is there any way to run multiple sensors at a time?

@gnykumar
Copy link
Author

Thanks @JustWon

I added multiple sensor at a time in manual_control.py

Now I am able to see multiple sensors at a time.

Screenshot from 2019-03-13 16-01-22

@AVA19
Copy link

AVA19 commented Apr 9, 2019

@gnykumar Can you further explain how you added multiple sensors at same time in manual_control.py

@gnykumar
Copy link
Author

gnykumar commented Apr 16, 2019

@AVA19

I Can Share you modified(few lines added by referring to already existing) manual_control.py.
You can try running directly or do difference checking between the original file you have and modified file
which I am giving, you will get understand easy.

manual_control_cam_seg_lidar.py.zip

@fpasch
Copy link
Contributor

fpasch commented Apr 16, 2019

You might also want to have a look onto the carla_ego_vehicle
This now supports defining sensors via json-file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants