When I run VRep alone, everything works fine. But when there is another CPU intensive executable running (eg: a SLAM localizer), VRep drops publishing the topic sporadically. Would threading the publishing script help? If so, how can I do that?
that would be very strange if V-REP would indeed drop publishing a message. Messages are published normally once per simulation step, as can be seen from this page.
What is probably happening is that the input buffer of your subscriber on the ROS node side is too small, and the message gets dropped (or overwritten) there?! Try increasing the queue size to see if that makes a difference.
which gives a smooth camera feed when I don't have another cpu intensive task running. But the moment the other task startups, the feed starts dropping frames.
That is very strange. Can you try to print a text in the publisher routine in file programming/ros_packages/vrep_plugin/src/ROS_server.cpp, recompile the plugin and try to see if a print is missed? You could also print another text in the sensing phase of a non-threaded child script, this way, the two messages should always appear in alternance.