[ros-users] Ros on Arm Hanging
Josh Faust
jfaust at willowgarage.com
Thu Jul 1 05:17:24 UTC 2010
Are you able to break into it in a debugger to see where it's using cpu? Do
topics work properly?
Josh
On Wed, Jun 30, 2010 at 5:46 PM, Daniel Stonier <d.stonier at gmail.com> 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;
> }
>
>
>
> --
> Phone : +82-10-5400-3296 (010-5400-3296)
> Home: http://snorriheim.dnsdojo.com/
> Yujin Robot: http://www.yujinrobot.com/
> Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100630/b665c126/attachment-0003.html>
More information about the ros-users
mailing list