ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2013-05-03 05:35:48 -0500 | answered a question | MATLAB MRC Engine and ROS Hi Javier Unfortunately, I wasn't able to solve the problem and didn't even consider recompiling ROS. Because the way I was using my MATLAB code was pretty simple and I didn't have enough time to make things right, I ended up using the typical "hack" of making two programs: a standard C++ ROS node with no dependencies to the MATLAB code or MCR and another C++ program (not a ROS node) that linked to the MCR and the MATLAB shared library. The C++ ROS node wrote the arguments needed for the MATLAB code as input files in a common folder and then called the C++ program that linked with the MCR. That same program then wrote the output to a common folder that was, at the end, read and parsed by the ROS node. One final detail that I had to change is that the MCR installation was asking me to change my LD_LIBRARY_PATH, which was raising problems everywhere else in my system (OpenRAVE for example). Therefore, I wrote a simple bash script that just changed the LD_LIBRARY_PATH just before calling the program that linked to the MCR As you can see, this is a really bad hack, but, because my application was simple enough, it was good enough for my needs. |
2013-05-02 17:43:38 -0500 | received badge | ● Famous Question (source) |
2013-04-13 02:09:41 -0500 | received badge | ● Notable Question (source) |
2013-03-27 09:34:31 -0500 | received badge | ● Popular Question (source) |
2013-03-27 06:30:37 -0500 | received badge | ● Student (source) |
2013-03-27 05:20:50 -0500 | commented answer | CMake with compiled matlab code Hi!Did this work?I want to do the same but my program crashes during runtime when calling mclInitializeApplication(NULL,0).I'm using MATLAB R2012b and fuerte. Any help would be immensely welcome as I'm really struggling with this http://answers.ros.org/question/59302/matlab-mrc-engine-and-ros/ |
2013-03-27 05:12:21 -0500 | commented answer | ROS/Matlab Simulink communication Hi rado0x54 Are you using a shared C++ library? I'm trying to create a ROS C++ node that uses (and links) to a shared C++ MATLAB R2012b Library compiled with mcc, but I'm having issues.Are there any more specific instructions for compiling ROS fuerte with MATLAB's boost headers and binaries?Thanks! |
2013-03-27 05:10:30 -0500 | commented question | MATLAB MRC Engine and ROS Thanks a lot for your help jbohren. I've updated my question now. |
2013-03-27 05:09:54 -0500 | received badge | ● Editor (source) |
2013-03-26 16:02:59 -0500 | asked a question | MATLAB MRC Engine and ROS Hi All First of all, sorry, if this question has been asked already. I've indeed come across several questions that seem very related, but since the errors I'm getting are not the same I figured I'd just ask. This (question/57991/use-matlab-code-within-ros/) is very related but it doesn't completely ask the same question. This one (/question/33326/matlab-engine-and-ros-library-incompatible/) is also relevant, but the error reported is different from mine. I'm using fuerte under Ubuntu 12.04 Precise and I would like to call some MATLAB functions that I have converted to MATLAB C++ Shared Libraries using MATLAB's mcc compiler (MATLAB R2012b in Ubuntu 12.04). If I don't use ROS, but just a simple C++ example with CMake, everything works perfectly, and I'm able to call the MATLAB functions without problems. However, when I try to do the same from a C++ ROS node, my node crashes with an strange error just after I try to execute the following line: I get the error: Aborted (core dumped) The CMakeLists that I use is: Note however, that compiling and linking work perfectly. Is there anyway to link to MATLAB Shared C++ libraries while using ROS at the same time? What I would like is to implement a ROS service that basically calls a MATLAB function with some arguments and then I get the output back (a couple of double arrays). This service would be called rarely but the MATLAB routine takes quite a while to complete (1-3 sec). I would like to avoid using other third party projects such as rosbridge or IPC-MATLAB bridge if possible.. Finally, if I was able to use MATLAB coder to completely generate C code for my current MATLAB functions instead of converting them to MATLAB MCR Shared Libraries, would my problem be solved? Has anybody had success with that? Thanks a lot for your help. UPDATE:This gets interesting. So if I use the same source file, but I comment all the ROS parts (ros::init ... (more) |