ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
7

gazebo_ros_control plugin: GazeboRosControlPlugin missing <legacyModeNS> DefaultRobotHWSim

asked 2018-05-28 03:51:44 -0600

bas gravatar image

I upgraded my Linux box from Ubuntu 17.04 to 18.04 (x64) and upgraded ROS lunar to melodic. Now, when I run my launch file I get the following error:

[ERROR] [1527494740.144219702, 307.635000000]: GazeboRosControlPlugin missing <legacyModeNS> 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 <legacyModeNS> to true.

I am not sure what this error message is telling me. Let me sum what I think I know:

  • The gazebo_ros_control plugin is a gazebo plugin providing an interface to control a robot in gazebo from ros. (so maybe this is not the right place to ask this question)
  • I am not sure which setting assumes that I am using an old implementation of DefaultRobotHWSim, but DefaultRobotHWSim is part of the ubuntu package ros-melodic-gazebo-ros-control. The following package is currently installed on my system: ros-melodic-gazebo-ros-control/bionic,now 2.8.2-0bionic.20180522.164152 amd64 [installed,automatic]

So according to the error message I have two options here:

  1. Fix this issue in an old package or
  2. set <legacyModeNS> to true

For 1. I am not sure what AN OLD PACKAGE refers to, one of my packages or the gazebo_ros_control plugin package and for 2. I am not sure where to set <legacyModeNS> to true.

I have another error where my publisher is stopping to publish control messages once I set a new set point, but I thought I fix the most obvious error first.

edit retag flag offensive close merge delete

Comments

Hi, have you fixed this issue? I met the same issue today. Thanks a lot.

lacfo gravatar image lacfo  ( 2018-08-26 15:53:00 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
14

answered 2018-05-28 04:39:27 -0600

bas gravatar image

Reading the source code in gazebo_ros_control_plugin.cpp for melodic and lunar (http://docs.ros.org/melodic/api/gazebo_ros_control/html/gazebo__ros__control__plugin_8cpp_source.html) this error message must have made its appearance already in lunar. I must have missed it.

So, for

  1. this would mean fixing the gazebo_ros_control plugin (as far as I understand)
  2. <legacyModeNS> goes into the .gazebo file accompanying the .urdf ord .xacro file

    <gazebo>
      <static>false</static>
    
      <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/mugator_manip</robotNamespace>
        <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
        <legacyModeNS>true</legacyModeNS>
      </plugin>
    </gazebo>
    
edit flag offensive delete link more

Comments

thanks, it can solve the question.

Yanqingyang gravatar image Yanqingyang  ( 2019-03-19 01:01:30 -0600 )edit

Solved mine too

Reshmon gravatar image Reshmon  ( 2019-05-06 03:24:10 -0600 )edit
2

What do you mean by "fixing the gazebo_ros_control plugin"? I have kinetic on Ubuntu 16.04 ang having the same problem even though I have gazebo-ros-control installed. How do I fix this?

teshansj gravatar image teshansj  ( 2019-09-17 23:00:35 -0600 )edit

I also have Kinetic on Ubuntu 16.04, and I added the line <legacynodens>true</legacynodens> in my gazebo file, just like @bas proposed. It seems to work, since I don't have the error anymore. I only had one .gazebo file, so it was easy to find it in my folders.

petitpoulet gravatar image petitpoulet  ( 2019-10-02 09:42:53 -0600 )edit

Where can I find the file where I can update legacyModeNS ?

oovidiustr gravatar image oovidiustr  ( 2019-10-18 10:10:21 -0600 )edit

below command should retrieve the path of the file where the changes need to be done.

grep robotSimType -R /home/my_name/catkin_ws

Replace the path in above command with your catkin workspace directory

sujideevi gravatar image sujideevi  ( 2020-02-03 21:00:07 -0600 )edit

where is file?I cant find it.

moyu gravatar image moyu  ( 2020-03-27 04:34:55 -0600 )edit

where to find the file? the .gazebo file i mean

mohan_pannirselvam gravatar image mohan_pannirselvam  ( 2020-05-05 15:48:27 -0600 )edit
0

answered 2020-07-10 03:32:20 -0600

Giri gravatar image

updated 2020-07-10 22:13:25 -0600

jayess gravatar image

Go to ur_discription/urdf/commom.gazebo.xacro and modify the file by as follows

<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro">

  <gazebo>
    <plugin name="ros_control" filename="libgazebo_ros_control.so">
      <!--robotNamespace>/</robotNamespace-->
      <!--robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType-->
      <legacyModeNS>true</legacyModeNS>
    </plugin>

<!--
    <plugin name="gazebo_ros_power_monitor_controller" filename="libgazebo_ros_power_monitor.so">
      <alwaysOn>true</alwaysOn>
      <updateRate>1.0</updateRate>
      <timeout>5</timeout>
      <powerStateTopic>power_state</powerStateTopic>
      <powerStateRate>10.0</powerStateRate>
      <fullChargeCapacity>87.78</fullChargeCapacity>     
      <dischargeRate>-474</dischargeRate>
      <chargeRate>525</chargeRate>
      <dischargeVoltage>15.52</dischargeVoltage>
      <chargeVoltage>16.41</chargeVoltage>
    </plugin>
-->
  </gazebo>
</robot>
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-05-28 03:51:44 -0600

Seen: 17,018 times

Last updated: Jul 10 '20