[ros-users] Ros on Arm Hanging
Cedric Pradalier
cedric.pradalier at mavt.ethz.ch
Thu Jul 1 06:19:15 UTC 2010
Hi Daniel,
not sure if it is related, but when running ROS on the Gumstix Verdex, I
had to increase the timeout in roslaunch/launch.py
(_TIMEOUT_MASTER_START) from 10.0 seconds to 20.0 seconds. Maybe you're
also affected by some timeout problems or race conditions that happen
only on slow processors...
Best
On 07/01/2010 02:46 AM, Daniel Stonier wrote:
> Hi all,
>
> We're trying to get ros running on an armv6 core here and hitting a
> few issues. If anyone has any insight on how to go about tracking down
> the issues that would be great.
>
> Some general details about the problem:
>
> It's an armv6 core running a custom gentoo with cturtle. The example
> programs I have to test with are a simple client-server pair. The
> client pings the server with a timestamped rpc service request, the
> server too, timestamps and then sends a response. When the response is
> received by the client, it outputs and terminates.
>
> So it's pretty simple, no more than a few lines of code in server and
> client (I've added the code below). End result though, the server
> catches the request, at which point both client and server hang and
> server cpu % goes through the roof. Since the code is simple, I'm
> figuring it must be behind the scenes somewhere (maybe in the rosdep
> library builds or system configuration?) I'm not sure how to track
> down the issue though - anyone have any ideas?
>
> Cheers,
> Daniel.
>
> ***************************** client.cpp *****************************
>
> class LatencyClient {
> public:
> LatencyClient() :
> client(node.serviceClient< rpc_latency::ping_pong>("rpc_latency"))
> {}
> /**
> * Latency benchmarking service request handler. This initiates
> the request and waits
> * for the response. Handling is done in main().
> * @return bool - success or failure of the request.
> */
> bool ping_pong() {
> rpc_latency::ping_pong srv;
> TimeStamp send_stamp;
> TimeStamp final_stamp;
>
> srv.request.ping_time = static_cast<double>(send_stamp.stamp());
> if ( client.call(srv) ) {
> final_stamp.stamp();
> ROS_INFO("Send Time : %lf", srv.response.pong_time -
> srv.request.ping_time);
> ROS_INFO("Return Time : %lf",
> static_cast<double>(final_stamp) - srv.response.pong_time);
> ROS_INFO("Round Trip : %lf",
> static_cast<double>(final_stamp - send_stamp) );
> return true;
> } else {
> ROS_ERROR("Failed to call service rpc_latency");
> return false;
> }
> }
>
> private:
> ros::NodeHandle node;
> ros::ServiceClient client;
> };
>
> int main(int argc, char **argv) {
> ros::init(argc, argv, "rpc_latency_client");
>
> LatencyClient latency;
> latency.ping_pong();
> return 0;
> }
>
> ***************************** server.cpp *****************************
>
> class LatencyServer {
> public:
> LatencyServer() :
> service (node.advertiseService("rpc_latency",
> &LatencyServer::ping_pong, this))
> {}
>
> void spin() {
> ros::spin();
> }
> bool ping_pong(rpc_latency::ping_pong::Request&request,
> rpc_latency::ping_pong::Response&response ) {
> response.pong_time = timestamp.stamp();
> ROS_INFO("TimeStamp: %lf", static_cast<double>(timestamp) );
> return true;
> }
>
> private:
> TimeStamp timestamp;
> ros::NodeHandle node;
> ros::ServiceServer service;
> };
>
> int main(int argc, char **argv) {
> ros::init(argc, argv, "rpc_latency_server");
>
> LatencyServer latency_server;
> latency_server.spin();
> return 0;
> }
>
>
>
>
--
Cedric - Specialising in cat herding
- http://www.asl.ethz.ch/people/cedricp
- http://www.skybotix.com
More information about the ros-users
mailing list