Connect a lidar sensor to a robot and get data to ROS
Hello. I am new to ROS and Gazebo. I am trying to put a 2D lidar sensor in a pre-existing robot in gazebo (i.e. turtlebot) and get the data from the sensor in ROS. So far, I followed the guided tutorials and I managed to create a custom velodyne sensor. Now I want to get the data in ROS and then put the sensor on the robot which will be also controlled by ROS. I feel a bit lost with all stand-alone tutorials about connecting it to ros. I don't know where I should start (inserting the robot, connect the sensor to ROS-and which method is more preferable, should I create the plugin directory into my catkin workspace? how can I use the ros-gazebo packages?). Can you please point me to a direction or guide me through a process ?
I'm using Ubuntu 16.04, ROS-kinetic and the pre-installed Gazebo 7.
Thank you in advance !
Asked by Meanmachine on 2020-09-15 03:31:46 UTC
Answers
The following steps may be helpful:
- In the URDF file of the robot, create a link/joint for the senso
- Add a gazebo reference tag, that will allow you to add the plugin for the sensor
Note: There are several plugins already available for commonly used sensors. If the existing plugins work for your case, then the tutorial below should be very helpful.
Check out the sensor plugin section at the link below. [http://gazebosim.org/tutorials?tut=ros_gzplugins]
Asked by PKGosal on 2020-09-15 22:57:31 UTC
Comments