Robotics StackExchange | Archived questions

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 huskyemptyworld.launch file there is "arg name="laser_enabled" default="true"/"

However, in spawnhusky.launch (which is called in the previous launch file) there is "arg name="laserenabled" default="$(optenv HUSKYLMS1XXENABLED 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 huskyemptyworld.launch I get the following errors:

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

[ERROR] [1562871609.012425750, 0.001000000]: GazeboRosControlPlugin missing while using DefaultRobotHWSim, defaults to true. 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 to true.

[ERROR] [1562871609.155345166, 0.001000000]: No p gain specified for pid. Namespace: /gazeboroscontrol/pidgains/frontleftwheel [ERROR] [1562871609.157337883, 0.001000000]: No p gain specified for pid. Namespace: /gazeboroscontrol/pidgains/frontrightwheel [ERROR] [1562871609.159119779, 0.001000000]: No p gain specified for pid. Namespace: /gazeboroscontrol/pidgains/rearleftwheel [ERROR] [1562871609.160873927, 0.001000000]: No p gain specified for pid. Namespace: /gazeboroscontrol/pidgains/rearrightwheel

[ WARN] [1562871609.593588359, 0.085000000]: updateConfig() called on a dynamic_reconfigure::Server that provides its own mutex. This can lead to deadlocks if updateConfig() is called during an update. Providing a mutex to the constructor is highly recommended in this case. Please forward this message to the node author.

and while exiting, I get:

[basecontrollerspawner-4] escalating to SIGTERM

[gazebo-2] escalating to SIGTERM

[WARN] [1562871659.750216, 28.914000]: Controller Spawner error while taking down controllers: transport error completing service call: receiveonce[/controllermanager/switch_controller]: unexpected error [Errno 4] Interrupted system call

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.

Asked by MKKM on 2019-07-11 14:36:07 UTC

Comments

Answers