/opt/ros/kinetic/lib/gazebo_ros/debug: 5: [: Linux: unexpected operator
When I am launching my model I am getting the following error:
glv@VaraPrasad:~/catkin_ws$ roslaunch my_mobilebot my_mobilebot.launch
... logging to /home/glv/.ros/log/d607c60a-e3f6-11e8-ae2d-9829a64aa0d2/roslaunch-VaraPrasad-1347.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://VaraPrasad:34401/
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14
* /use_sim_time: True
NODES
/
gazebo (gazebo_ros/debug)
gazebo_gui (gazebo_ros/gzclient)
auto-starting new master
process[master]: started with pid [1357]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to d607c60a-e3f6-11e8-ae2d-9829a64aa0d2
process[rosout-1]: started with pid [1374]
started core service [/rosout]
process[gazebo-2]: started with pid [1382]
/opt/ros/kinetic/lib/gazebo_ros/debug: 5: [: Linux: unexpected operator
process[gazebo_gui-3]: started with pid [1399]
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gzserver...(no debugging symbols found)...done.
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[ INFO] [1541750994.532718810]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1541750994.534274778]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fffceb98700 (LWP 1493)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fffca683700 (LWP 1494)]
[New Thread 0x7fffc9e82700 (LWP 1495)]
[New Thread 0x7fffc9681700 (LWP 1498)]
[New Thread 0x7fffc8e80700 (LWP 1499)]
[New Thread 0x7fffc3fff700 (LWP 1501)]
[New Thread 0x7fffc37fe700 (LWP 1513)]
[New Thread 0x7fffc2ffd700 (LWP 1514)]
[New Thread 0x7fffc27fc700 (LWP 1515)]
[New Thread 0x7fffc1ffb700 (LWP 1516)]
[New Thread 0x7fffc17fa700 (LWP 1519)]
[New Thread 0x7fffc0ff9700 (LWP 1520)]
[New Thread 0x7fffabfff700 (LWP 1521)]
[New Thread 0x7fffab7fe700 (LWP 1522)]
[New Thread 0x7fffaaffd700 (LWP 1523)]
[New Thread 0x7fffaa7fc700 (LWP 1524)]
[New Thread 0x7fffa9ffb700 (LWP 1525)]
[ INFO] [1541750996.963564299]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1541750996.965872363]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[New Thread 0x7fffa97fa700 (LWP 1527)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[
tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fff7ffff700 (LWP 1528)]
[New Thread 0x7fff7f7fe700 (LWP 1529)]
[New Thread 0x7fff7effd700 (LWP 1530)]
[New Thread 0x7fff7e7fc700 (LWP 1531)]
[New Thread 0x7fff7dffb700 (LWP 1536)]
[New Thread 0x7fff7d7fa700 (LWP 1537)]
[New Thread 0x7fff7cff9700 (LWP 1540)]
[New Thread 0x7fff63fff700 (LWP 1541)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fff637fe700 (LWP 1553)]
[New Thread 0x7fff62ffc700 (LWP 1554)]
[New Thread 0x7fff633fd700 (LWP 1555)]
[New Thread 0x7fff62bfb700 (LWP 1556)]
[New Thread 0x7fff623f9700 (LWP 1558)]
[New Thread 0x7fff627fa700 (LWP 1557)]
[New Thread 0x7fff61ff8700 (LWP 1559)]
[New Thread 0x7fff61bf7700 (LWP 1652)]
[New Thread 0x7fff613f6700 (LWP 1656)]
[New Thread 0x7fff60bf5700 (LWP 1657)]
[New Thread 0x7fff27fff700 (LWP 1658)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[ INFO] [1541750997.801048423]: DiffDrive missing <robotNamespace>, defaults is my_mobilebot
[ INFO] [1541750997.801215769]: Starting plugin DiffDrive(ns = my_mobilebot/)
[ WARN] [1541750997.801294600]: DiffDrive(ns = my_mobilebot/): missing <rosDebugLevel> default is na
[ INFO] [1541750997.802481643]: DiffDrive(ns = my_mobilebot/): <tf_prefix> = my_mobilebot
[ WARN] [1541750997.802639269]: DiffDrive(ns = my_mobilebot/): missing <publishWheelTF> default is false
[ WARN] [1541750997.802678246]: DiffDrive(ns = my_mobilebot/): missing <publishOdomTF> default is ture
[ WARN] [1541750997.802708892]: DiffDrive(ns = my_mobilebot/): missing <publishWheelJointState> default is false
[ WARN] [1541750997.802845253]: DiffDrive(ns = my_mobilebot/): missing <wheelAcceleration> default
is 0
[ WARN] [1541750997.802883375]: DiffDrive(ns = my_mobilebot/): missing <wheelTorque> default is 5
[ WARN] [1541750997.802997898]: DiffDrive(ns = my_mobilebot/): missing <odometrySource> default is 1
[ WARN] [1541750997.803092272]: GazeboRosDiffDrive Plugin (ns = ) missing <publishTf>, defaults to 1
[ INFO] [1541750997.804349553]: DiffDrive(ns = my_mobilebot/): Try to subscribe to cmd_vel
[ INFO] [1541750997.809908502]: DiffDrive(ns = my_mobilebot/): Subscribe to cmd_vel
[ INFO] [1541750997.811088877]: DiffDrive(ns = my_mobilebot/): Advertise odom on odom
[New Thread 0x7fff26c9b700 (LWP 1676)]
[ INFO] [1541750997.835758765, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1541750997.895648491, 0.076000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1541750997.926633418, 0.107000000]: Physics dynamic reconfigure ready.
[Thread 0x7fffa9ffb700 (LWP 1525) exited]
[ INFO] [1541750997.990394536, 0.170000000]: Physics dynamic reconfigure ready.
[New Thread 0x7fff2649a700 (LWP 2484)]
Thanks In Advance!!!
Asked by GLV on 2018-11-09 03:48:24 UTC
Comments
The following could be related: ros-simulation/gazebo_ros_pkgs#823.
Asked by gvdhoorn on 2018-11-09 06:07:18 UTC
Thanks Mr.gvdhoorn but I don't understand what I want change in my bash file
Asked by GLV on 2018-11-09 09:22:29 UTC
Well, the diff is here. But afaik those changes would already have been released in the current version of
gazebo_ros_pkg
. What is the output ofdpkg -l | grep gazebo-ros-pkg
on your machine?Asked by gvdhoorn on 2018-11-09 09:40:41 UTC
glv@VaraPrasad:~$ dpkg -l | grep gazebo-ros-pkg
ii ros-kinetic-gazebo-ros-pkgs 2.5.17-0xenial-20181005-181452-0800 amd64 Interface for using ROS with the Gazebo simulator.
Asked by GLV on 2018-11-09 21:38:50 UTC
Thank you so much Mr.gvdhoorn. Your solution is worked for me!!!
Asked by GLV on 2018-11-09 21:40:59 UTC
Which solution? Did you edit the file in
/opt/ros/kinetic/lib/gazebo_ros/debug
? That is not how this should be approached.Asked by gvdhoorn on 2018-11-10 02:27:27 UTC
I replaced this line
**if [ $(uname) == "Darwin" ]; then**
with**if [ $(uname) = "Darwin" ]; then**
then it's worked I don't get any error!!
Asked by GLV on 2018-11-10 03:55:22 UTC
Yes, so did you do this in the file in
/opt/ros/kinetic/..
? Cause editing files in system locations (ie: managed byapt
) is not generally recommended.Asked by gvdhoorn on 2018-11-10 07:03:36 UTC
Yes, I use
gksu nautilus
command to edit that file. Once again Thank you for your response Mr.gvdhoornAsked by GLV on 2018-11-10 10:36:52 UTC
Right. So that is what you should not do.
Asked by gvdhoorn on 2018-11-11 07:08:09 UTC
I am facing the same issue. Do you know how to resolve it ?
Asked by zeeshan on 2018-12-17 04:12:18 UTC
sorry for late answering. Follow the above procedure it works for me .
Asked by GLV on 2018-12-20 00:29:24 UTC