window与ubuntu建立ROS通信


在window下,建立与ubuntu系统中ROS的通信,实现将window中的字符发个ubuntu中ROS系统
资源截图
代码片段和文件信息
/*
 * Software License Agreement (BSD License)
 *
 * Copyright (c) 2011 Willow Garage Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms with or without
 * modification are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above
 *    copyright notice this list of conditions and the following
 *    disclaimer in the documentation and/or other materials provided
 *    with the distribution.
 *  * Neither the name of Willow Garage Inc. nor the names of its
 *    contributors may be used to endorse or promote prducts derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
 * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT
 * INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING
 * BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT
 * LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include 
#include “ros/duration.h“

namespace ros
{
  void normalizeSecNSecSigned(int32_t &sec int32_t &nsec)
  {
    int32_t nsec_part = nsec;
    int32_t sec_part = sec;

    while (nsec_part > 1000000000L)
    {
      nsec_part -= 1000000000L;
      ++sec_part;
    }
    while (nsec_part < 0)
    {
      nsec_part += 1000000000L;
      --sec_part;
    }
    sec = sec_part;
    nsec = nsec_part;
  }

  Duration& Duration::operator+=(const Duration &rhs)
  {
    sec += rhs.sec;
    nsec += rhs.nsec;
    normalizeSecNSecSigned(sec nsec);
    return *this;
  }

  Duration& Duration::operator-=(const Duration &rhs){
    sec += -rhs.sec;
    nsec += -rhs.nsec;
    normalizeSecNSecSigned(sec nsec);
    return *this;
  }

  Duration& Duration::operator*=(double scale){
    sec *= scale;
    nsec *= scale;
    normalizeSecNSecSigned(sec nsec);
    return *this;
  }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-01-03 20:29  rosserial_hello_world
     目录           0  2017-10-16 19:15  rosserial_hello_world.vs
     目录           0  2017-10-16 19:15  rosserial_hello_world.vs
osserial_hello_world
     目录           0  2017-10-16 19:15  rosserial_hello_world.vs
osserial_hello_worldv14
     文件       48640  2018-01-03 20:29  rosserial_hello_world.vs
osserial_hello_worldv14.suo
     目录           0  2017-10-17 21:17  rosserial_hello_worldDebug
     文件      154624  2018-01-03 16:26  rosserial_hello_worldDebug
osserial_hello_world.exe
     文件     1167284  2018-01-03 16:26  rosserial_hello_worldDebug
osserial_hello_world.ilk
     文件     1896448  2018-01-03 16:26  rosserial_hello_worldDebug
osserial_hello_world.pdb
     文件        6388  2017-03-01 17:41  rosserial_hello_worldWindowsSocket.cpp
     文件        2161  2017-03-01 17:41  rosserial_hello_worldWindowsSocket.h
     目录           0  2017-10-16 19:20  rosserial_hello_worldactionlib
     文件        1540  2017-10-16 09:05  rosserial_hello_worldactionlibTestAction.h
     文件        1434  2017-10-16 09:05  rosserial_hello_worldactionlibTestActionFeedback.h
     文件        1380  2017-10-16 09:05  rosserial_hello_worldactionlibTestActionGoal.h
     文件        1408  2017-10-16 09:05  rosserial_hello_worldactionlibTestActionResult.h
     文件        1669  2017-10-16 09:05  rosserial_hello_worldactionlibTestFeedback.h
     文件        1565  2017-10-16 09:05  rosserial_hello_worldactionlibTestGoal.h
     文件        1617  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestAction.h
     文件        1483  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestActionFeedback.h
     文件        1429  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestActionGoal.h
     文件        1457  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestActionResult.h
     文件         679  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestFeedback.h
     文件       10030  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestGoal.h
     文件        2425  2017-10-16 09:05  rosserial_hello_worldactionlibTestRequestResult.h
     文件        1617  2017-10-16 09:05  rosserial_hello_worldactionlibTestResult.h
     文件        1573  2017-10-16 09:05  rosserial_hello_worldactionlibTwoIntsAction.h
     文件        1455  2017-10-16 09:05  rosserial_hello_worldactionlibTwoIntsActionFeedback.h
     文件        1401  2017-10-16 09:05  rosserial_hello_worldactionlibTwoIntsActionGoal.h
     文件        1429  2017-10-16 09:05  rosserial_hello_worldactionlibTwoIntsActionResult.h
     文件         659  2017-10-16 09:05  rosserial_hello_worldactionlibTwoIntsFeedback.h
............此处省略1031个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)