Gazebo | Ignition | Community
Ask Your Question
1

where to find resource if I want to better/further understand gazebo::common::events

asked 2014-10-31 11:38:03 -0600

Zheng yo chen gravatar image

I want to learn more about Event::connect disconnect

but there is no tutorial on official website

API Documentation about "event" is very short,and I can't understand http://osrf-distributions.s3.amazonaw...11event11Events.html#ab0fefed82c8ab22f67cf5a3870bcb9ef

where to find resource if I want to better/further understand gazebo::common::events ??

Because I encountered a problem as following:

I have two plugin,

one world plugin "evaluationplatform", another one is model plugin "armcontrol"

in onUpdate() of the world plugin "evaluationplatform", I use DisconnectWorldUpdateBegin(updateconnection) to Disconnect "onUpdate()" under some condition

I tested these two plugin independently, and they worked well as I want,

but, when I used them together ,things went wrong

onUpdate() of the world plugin "evaluationplatform" cannot be disconnected

and I guess the critical point is in model plugin "arm_control"

So .I want to learn more about Event::connect & disconnect to find out the problem

Thank you!!

這裡有沒有說中文的夥伴啊~~?

edit retag flag offensive close merge delete

Comments

Can you show some of your code so we can try to reproduce the problem?

scpeters gravatar imagescpeters ( 2014-11-04 01:39:03 -0600 )edit

有啊,真是太难找到同伴了,有时间一起讨论下?你是做什么项目的啊?

YuanGao gravatar imageYuanGao ( 2014-11-06 08:25:07 -0600 )edit

機器手臂 與電腦視覺整合

Zheng yo chen gravatar imageZheng yo chen ( 2014-11-19 23:55:15 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2014-11-24 14:42:33 -0600

nkoenig gravatar image

Here is the API documentation for the event system.

Here is a set of example event definitions.

Basic usage:

  1. Define an event (see gazebo/common/Events.hh for examples).

  2. Create a Connection, which registers a callback to an Event. Make sure to keep the Connection alive (don't destroy it), until you are done.

  3. Trigger the event, and the callback will be run.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-10-31 11:38:03 -0600

Seen: 804 times

Last updated: Nov 24 '14