Home | Tutorials | Wiki | Issues
Ask Your Question
0

Robot with Custom Plugin locks up gzclient

asked 2014-02-24 09:57:21 -0600

qworg gravatar image

updated 2014-02-24 13:10:55 -0600

I have a custom plugin that is designed to drive a robot via protobuf messages.

When I place this robot into an empty world, it begins locking out gzclient - while gzserver keeps running fine.

The run of gzclient looks like this:

Starting program: /usr/bin/gzclient-2.2.2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xafbb8b40 (LWP 6831)]
Gazebo multi-robot simulator, version 2.2.2
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[New Thread 0xaefffb40 (LWP 6832)]
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 10.18.104.83
[New Thread 0xae5ffb40 (LWP 6833)]
[New Thread 0xabc96b40 (LWP 6834)]
[New Thread 0xab295b40 (LWP 6835)]
[New Thread 0xaa894b40 (LWP 6836)]
[New Thread 0xa9e93b40 (LWP 6837)]
[New Thread 0xa9492b40 (LWP 6838)]
[New Thread 0xa8a91b40 (LWP 6839)]
[New Thread 0xa8090b40 (LWP 6840)]
[New Thread 0xa788fb40 (LWP 6841)]
[New Thread 0xa6238b40 (LWP 6842)]
[New Thread 0xa58ffb40 (LWP 6843)]
[New Thread 0xa4de3b40 (LWP 6844)]
[New Thread 0xa41ffb40 (LWP 6845)]
[New Thread 0xa3ffeb40 (LWP 6846)]
[New Thread 0xa39feb40 (LWP 6848)]
[New Thread 0xa3bffb40 (LWP 6847)]
[New Thread 0xa35fcb40 (LWP 6849)]
[New Thread 0xa33fbb40 (LWP 6851)]
[New Thread 0xa37fdb40 (LWP 6850)]
[Thread 0xa6238b40 (LWP 6842) exited]
^C
Program received signal SIGINT, Interrupt.
0xb7fdd424 in __kernel_vsyscall ()

The CTRL-C comes after it has locked out for at least a minute.

The backtrace:

(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb6a3084b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0xb7edeadc in wait (m=..., this=<optimized out>)
    at /usr/include/boost/thread/pthread/condition_variable.hpp:56
#3  gazebo::transport::request (_worldName=..., _request=..., _data=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/transport/TransportIface.cc:203
#4  0x0810a376 in gazebo::gui::JointControlWidget::SetModelName (this=0x8b39c70, _modelName=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/JointControlWidget.cc:256
#5  0x08161ea6 in gazebo::gui::ToolsWidget::OnSetSelectedEntity (this=0x8b397c0, _name=...)
    at /tmp/buildd/gazebo-current-2.2.2/gazebo/gui/ToolsWidget.cc:76
#6  0x08162500 in operator() (a2=..., a1=..., p=<optimized out>, this=0x8b51024)
    at /usr/include/boost/bind/mem_fn_template.hpp:280
#7  operator()<boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, const std::basic_string<char>&, const std::basic_string<char>&>, boost::_bi::list2<std::basic_string<char>&, std::basic_string<char>&> > (
    a=<synthetic pointer>, f=..., this=0x8b5102c) at /usr/include/boost/bind/bind.hpp:392
#8  operator()<std::basic_string<char>, std::basic_string<char> > (a2=..., a1=..., this=0x8b51024)
    at /usr/include/boost/bind/bind_template.hpp:61
#9  boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, gazebo::gui::ToolsWidget, std::string const&, std::string const&>, boost::_bi::list3<boost::_bi::value<gazebo::gui::ToolsWidget*>, boost::arg<1>, boost::arg<2> > >, void, std::string, std::string>::invoke (function_obj_ptr=..., a0=..., a1=...) at /usr/include/boost/function/function_template.hpp:153
#10 0x080f450e in operator() (a1=..., a0=..., this=0x8b51020)
    at /usr/include/boost/function/function_template.hpp:760
#11 gazebo::event::EventT<void (std::string, std::string)>::Signal<std::string, char [7 ...
(more)
edit retag flag offensive close merge delete

Comments

You shouldn't call transport::init or transport::run inside a plugin. Transport setup is handled for you.

nkoenig gravatar imagenkoenig ( 2014-02-24 19:00:15 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-25 14:58:30 -0600

qworg gravatar image

As per nkoenig above - my error was in calling transport inside of the plugin.

Thanks!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-02-24 09:57:21 -0600

Seen: 385 times

Last updated: Feb 25 '14