0
$\begingroup$

Rosanswers logo

I need to make a code to move the turtlebot both the simulator and the real robot, I've done this code in c ++ but need to run the same in C pure, which will use the functions that receive parameters and bring back the topic as a library in pascals. I wonder is this possible and how can I do!

Thank you


Originally posted by leobber on ROS Answers with karma: 15 on 2014-11-05

Post score: 0


Original comments

Comment by dornhege on 2014-11-05:
Do you need actual pure C as in compile as C or do you want a C-style code or do you only need a C-interface to some functionality?

Comment by leobber on 2014-11-05:
I initially need a C code that uses teleoperation for turtlebot if possible would like it to be in C, but I saw reports that I have to make a code in C and functions to send and receive a code C ++ to communicate with the ROS, if so help me, too, am new to developing for ROS. Thank you

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

ROS doesn't provide a native C API.

It might be possible to write a wrapper library which exposes some aspects of ROS as a C API, and then you could create a Pascal wrapper around that library. This will require a fairly substantial understanding of the ROS C++ API, and isn't really something I'd recommend for a beginner.

Is there a specific reason that you need to use Pascal instead of C++ or Python?

If there is a JSON library for pascal, you might be able to write a pure Pascal library which communicates with rosbdrige_suite. It won't be incredibly fast, but it will probably be far easier to develop and use.


Originally posted by ahendrix with karma: 47576 on 2014-11-05

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by leobber on 2014-11-05:
The Paschal would I want to use Lazarus, Lazarus would use to create an interface that interacted directly with both turtlebot the gazebo when simulating real. About creating a JSON library pascal COULD orientadar me where I can get the research.

Comment by leobber on 2014-11-05:
The interest in using pascal to integrate the features that I will use the turtlebot and ROS, would gain the title at runtime, or opnion of you should use the codes directly in ROS, running from packages?

If it is actually better and faster'll be in native languages!

$\endgroup$
0
$\begingroup$

Rosanswers logo

rosc is a pure C implementation of ROS API (currently in alpha): http://wiki.ros.org/rosc


Originally posted by Mani with karma: 1704 on 2014-11-05

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.