ros-industrial / cros Goto Github PK
View Code? Open in Web Editor NEWA single thread pure C implementation of the ROS framework
License: BSD 3-Clause "New" or "Revised" License
A single thread pure C implementation of the ROS framework
License: BSD 3-Clause "New" or "Revised" License
This seems to only be a problem when CROS_MESSAGE_SERIALIZATION_TEST
is defined, but for example here:
[..]
cRosService service;
cRosServiceInit(&service);
cRosServiceBuild(&service,"/home/nico/Desktop/test_msgs/nav_msgs/GetPlan.srv");
[..]
Should those messages be included in the cROS distribution, or should the code be refactored somehow?
Just compiled cros (0abb16d) on Ubuntu Precise (12.04), 32 bit (up-to-date as of 2015-04-28), then tried to start api-test
and received the following SIGSEGV
(note that the console output states that api-test
is connecting to a roscore
, but I did not start it):
Starting program: /home/user/ros/cros/cros-master/samples/bin/api-test
Running node "/Gripper" with host : 127.0.0.1, roscore host : 127.0.0.1 and roscore port : 11311
To set a different node/host/port, take a look at the options: /home/user/ros/cros/cros-master/samples/bin/api-test -h
Publishing topic /rosout type rosgraph_msgs/Log
Registering service /Gripper/get_loggers type roscpp/GetLoggers
Registering service /Gripper/set_logger_level type roscpp/SetLoggerLevel
[1430225884,0] cROS Node (version 0.90) created!
Subscribing to topic /gripperstatus type gripping_robot/GripperStatus
Subscribing to topic /gripperjoints type gripping_robot/GripperJoints
Registering service /close_clamps type gripping_robot/CloseGripper
Registering service /open_clamps type gripping_robot/OpenGripper
Registering service /park_configuration type gripping_robot/RestPosition
Registering service /reconfigure type gripping_robot/Reconfigure
Registering service /transfer type gripping_robot/Transfer
Registering service /move_arm type gripping_robot/MoveArm
Program received signal SIGSEGV, Segmentation fault.
0x08053170 in cRosNodeDoEventsLoop (n=0x8075008) at /home/user/ros/cros/cros-master/src/cros_node.c:2327
2327 if( FD_ISSET(server_fd, &err_fds) )
The backtrace at that point is:
(gdb) bt
#0 0x08053170 in cRosNodeDoEventsLoop (n=0x8075008) at /home/user/ros/cros/cros-master/src/cros_node.c:2327
#1 0x08053bb3 in cRosNodeStart (n=0x8075008, exit=0xbfffec3b "") at /home/user/ros/cros/cros-master/src/cros_node.c:2449
#2 0x0804da95 in main (argc=1, argv=0xbffff0f4) at /home/user/ros/cros/cros-master/samples/api-test.c:362
(gdb) print serv
server_fd service_idx service_type serviceresponse_type
service service_name servicerequest_type services
(gdb) print server_fd
$1 = -1
(gdb) print err_fds
$2 = {__fds_bits = {0 <repeats 32 times>}}
gcc: 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
I can provide more info if desired.
(Ubuntu 14.04; 64 bit; ROS Indigo)
I compiled cros and started a roscore
and the talker
.
The node is running, but I get a warning:
Publishing topic /rosout type rosgraph_msgs/Log
Registering service /talker/get_loggers type roscpp/GetLoggers
Registering service /talker/set_logger_level type roscpp/SetLoggerLevel
Publishing topic /chatter type std_msgs/String
readSubcriptioHeader() WARNING : TCPROS_TCP_NODELAY_TAG not implemented
However, by running the command rostopic echo /chatter
in another terminal the node crashes after publishing a varying amount of messages:
Publishing topic /rosout type rosgraph_msgs/Log
Registering service /talker/get_loggers type roscpp/GetLoggers
Registering service /talker/set_logger_level type roscpp/SetLoggerLevel
Publishing topic /chatter type std_msgs/String
readSubcriptioHeader() WARNING : TCPROS_TCP_NODELAY_TAG not implemented
readSubcriptioHeader() WARNING : TCPROS_TCP_NODELAY_TAG not implemented
[1494409124,0] hello world 0
[1494409124,0] hello world 0
[1494409124,0] hello world 0
[1494409124,0] hello world 0
[1494409124,0] hello world 0
Segmentation fault (core dumped)
If I run instead the listener
, the listener
itself crashes first with another warning:
Publishing topic /rosout type rosgraph_msgs/Log
Registering service /listener/get_loggers type roscpp/GetLoggers
Registering service /listener/set_logger_level type roscpp/SetLoggerLevel
Subscribing to topic /chatter type std_msgs/String
Host: 127.0.0.1
readPublicationHeader() WARNING : TCPROS_LATCHING_TAG not implemented
Segmentation fault (core dumped)
The current readme states:
cROS is licensed under the GNU Lesser General Public License v3.0. For more licensing options and for paid support please write an email to [email protected].
Since f3c0869 that is no longer accurate, it should be BSD
.
As per subject (from here and here):
int loadFromFileMsg(char* filename, cRosMessageDef* msg)
{
[..]
char* token_pack;
[..]
while(tok != NULL)
{
if(strcmp(tok, "msg") != 0)
{
token_root = token_pack;
[..]
}
[..]
}
I haven't followed the logic in loadFromFileMsg(..)
, but token_pack
should be initialised in any case.
Setup:
roscore
talker
rostopic echo /chatter
(rt0
and rt1
in the description below)Observed:
both rt0
and rt1
start receiving messages, but rt0
gets the even publications, and rt1
gets the uneven publications (this is just an example, it could be the other way around):
output of rt0
:
...
---
data: hello world 120
---
data: hello world 122
---
data: hello world 124
...
output of rt1
:
...
---
data: hello world 121
---
data: hello world 123
---
data: hello world 125
...
Expected:
It would appear that the callback is called twice: once for each subscriber, giving each subscriber their own copy (or: a new message).
I would've expected the callback to be called once, and the resulting message (ie: hello world 121
) copied to all connected subscribers.
I'm trying out cros on OSX 10.10. I have a branch that fixes simple compile problems and avoids passing -1 file descriptors to FD_SET()
(the manpage says that this leads to undefined behavior, and while Linux tolerates it, OSX just segfaults):
So now I can build and run examples, but nothing connects. I don't see any indication that roscore
is being contacted by the nodes. I'm happy to do the debugging, but I'd love to get some guidance on where to look for the problem
When I try to start the sample programs(Windows, VS2017) I get errors concerning the format of the message definition files in the db folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.