Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to add LIDAR to Husky simulator in Gazebo

I am running Husky simulation in Gazebo as outlined here http://wiki.ros.org/husky_gazebo/Tutorials/Simulating%20Husky

In husky_empty_world.launch file there is "arg name="laser_enabled" default="true"/"

However, in spawn_husky.launch (which is called in the previous launch file) there is "arg name="laser_enabled" default="$(optenv HUSKY_LMS1XX_ENABLED false)"/"

So my first question is what "optenv" actually does. The second one is how can I get a simulated LIDAR that publishes to some ROS topic?

I am using ROS-kinetic, when launching husky_empty_world.launch I get the following errors:

Warning [parser_urdf.cc:1232] multiple inconsistent <gravity> exists due to fixed joint reduction overwriting previous value [true] with [false].

This setting assumes you have an old package with an old implementation of DefaultRobotHWSim, where the robotNamespace is disregarded and absolute paths are used instead. If you do not want to fix this issue in an old package just set <legacymodens> to true.

and while exiting, I get:

[base_controller_spawner-4] escalating to SIGTERM

[gazebo-2] escalating to SIGTERM

PS. I have tried to follow this tutorial http://gazebosim.org/tutorials?tut=add_laser but there seems to be no .sdf file for husky in my installation.