Adding lidar sensor to urdf simulation

asked 2020-08-18 22:31:17 -0500

TheHappyIrishman gravatar image

So I have a gazebo-ros model with a sensor that can move based on the instructions of a python file. Essentially I'm trying to make a parking system for planes into a tee-hanger. At this point I have a differential drive model. I messed around doing it with sensors, have it working from plugins right now. I'm trying to add a sensor to this simulation so it can sense where the parking garage is. With the default heroku sensor when I press echo /(namespace)/sensor, the rostopic it is supposed to be projecting to I get a matrix of sensors where all elements of -inf for each element, 1.0 for strength on each element. This happens even when I put the parking garage right in front of the driving model. Right now I've been using the urf model but I get this error message [ERROR] [1597807378.207168536]: Error connecting to Hokuyo: Could not open serial Hokuyo: /dev/ttyACM0 @ 115200 could not open serial device. There is no /dev/ttyACM0 file. Like I don't have one. I think I've installed the right package and this is currently the only error message I'm getting. This is only for a simulation and I just need a lidar based way to see so I can move on with the algorithm to actually get my model parking. If there's no way to resolve this, I would also appreciate other places to look. I'm new to programming, I'm a math major that somehow wound up in a programming role. Please save my life. Thanks.

edit retag flag offensive close merge delete

Comments

@TheHappyIrishman, It seems to me after reading your post that you are launching the sensor driver in your machine and it is searching the lidar in a port that does no exist cause you have connected the sensor. If you want to add a lidar to your simulation you can check this and this that shows you the how-to. Furthermore you can also take a look at this in which you can find they are using the hokuyo.

Finally if you want to have a more realistic output from the plugin, instead of using the basic gazebo plugin you can use this one that produces proper pointclouds for your simulation.

Weasfas gravatar image Weasfas  ( 2020-08-20 06:21:02 -0500 )edit