yujinrobot / yujin_ocs

Yujin Robot's open-source control libraries
http://wiki.ros.org/yujin_ocs
235 stars 178 forks source link

Occasional yocs_cmd_vel_mux initialization failure #136

Open SomeshDaga opened 5 years ago

SomeshDaga commented 5 years ago

I am using the devel branch from source on ROS Melodic, and occasionally experience a failure of the yocs_cmd_vel_mux nodelet as soon as it starts up. The logs reference a ASSERTION_FAILED error from the ROS Publisher library. Based on some research, this seems to be related to attempting to publish before the call to advertise() is made.

Looking at the source code for yocs_cmd_vel_mux, the output command velocity topic's advertise() call is only being made in the reloadConfiguration() function and not in the onInit() function. There might possibly be a race condition, between any subscriber callbacks (where the output command velocities are also published) being triggered and the reloadConfiguration() being called.