{"id":16678861,"url":"https://github.com/otl/rosruby","last_synced_at":"2025-03-21T18:32:19.794Z","repository":{"id":2951208,"uuid":"3964972","full_name":"OTL/rosruby","owner":"OTL","description":"ruby ROS client.","archived":false,"fork":false,"pushed_at":"2017-08-15T06:39:07.000Z","size":1360,"stargazers_count":24,"open_issues_count":2,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-03-14T22:50:40.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://otl.github.com/rosruby/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OTL.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-08T15:15:06.000Z","updated_at":"2021-10-25T17:34:41.000Z","dependencies_parsed_at":"2022-08-30T23:01:11.585Z","dependency_job_id":null,"html_url":"https://github.com/OTL/rosruby","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OTL%2Frosruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OTL%2Frosruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OTL%2Frosruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OTL%2Frosruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OTL","download_url":"https://codeload.github.com/OTL/rosruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221817547,"owners_count":16885560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T13:31:44.073Z","updated_at":"2024-10-28T10:35:35.608Z","avatar_url":"https://github.com/OTL.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"ROS Ruby Client: rosruby\n=======\n[ROS](http://ros.org) is Robot Operating System developed by [OSRF](http://osrfoundation.org/) and open source communities.\n\nThis project supports ruby ROS client. You can program intelligent robots by ruby, very easily.\n\n**Homepage**:     http://otl.github.com/rosruby\n**Git**:          http://github.com/OTL/rosruby\n**Author**:       Takashi Ogura\n**Copyright**:    2012\n**License**:      new BSD License\n**Latest Version**: 0.4.3\n\nRequirements\n----------\n- ruby (1.8.7/1.9.3)\n- ROS (hydro/groovy)\n\nelectric/fuerte\n---------\nIf you are using electric or fuerte, please use v0.2.1.\n\n\nInstall (binary)\n------------------\n\n```bash\nsudo apt-get install ros-hydro-rosruby\n```\n\nthen you have to source /opt/ros/hydro/setup.bash for ruby library path.\n\nInstall from source\n---------------\nInstall ROS and ruby first. ROS document is [http://ros.org/wiki/ROS/Installation](http://ros.org/wiki/ROS/Installation) .\nrosruby uses genrb for message generation. After install genrb, .rb message files are automatically compiled if there are message source package exists in your catkin_ws/src directory.\n\nrosruby uses catkin. If you have not catkin_ws yet, please read [this wiki](http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment).\n\n````bash\n$ cd ~/catkin_ws/src\n$ git clone https://github.com/OTL/genrb.git\n$ git clone https://github.com/OTL/rosruby.git\n$ cd ~/catkin_ws\n$ catkin_make\n```\n\nInstall from source (indigo/jade)\n----------------------------\nTry indigo-devel branch.\n\n```bash\n$ cd ~/catkin_ws/src/rosruby\n$ git checkout indigo-devel\n$ cd ~/catkin_ws\n$ catkin_make\n```\n\nMessage generation\n-----------------------\nYou must generate ROS msg/srv files for rosruby if the msg/srv packages are not compiled from source.\nIf you are using catkin package, it is easy.\nPlease add below to your package CMakeLists.txt.\n\n    find_package(rosruby)\n    rosruby_generate_messages(message_pkg1 message_pkg2 ...)\n\n\nOr, you can generate it manually.\nPlease use the msg/srv generation script (rosruby_genmsg.py) in order to\ngenerage rosruby messages.\n\nFor example, (please replace `catkin_ws` to your catkin workspace)\n\n```bash\n$ rosrun rosruby rosruby_genmsg.py geometry_msgs nav_msgs -d ~/catkin_ws/devel/lib/ruby/vendor_ruby/\n```\n\nIf you want to generate msg/srv files from source (for example your project), it is automatically\ngenerated by [genrb](http://github.com/OTL/genrb).\n\nSample Source\n--------------\nYou can get rosruby sample programs from [rosruby_tutorials](https://github.com/OTL/rosruby_common) package.\n\n## Subscriber\n\n```ruby\n#!/usr/bin/env ruby\n\nrequire 'ros'\nrequire 'std_msgs/String'\n\nnode = ROS::Node.new('/rosruby_sample_subscriber')\nnode.subscribe('/chatter', Std_msgs::String) do |msg|\n  puts \"message come! = \\'#{msg.data}\\'\"\nend\n\nwhile node.ok?\n  node.spin_once\n  sleep(1)\nend\n\n```\n\n## Publisher\n\n```ruby\n#!/usr/bin/env ruby\n\nrequire 'ros'\nrequire 'std_msgs/String'\n\nnode = ROS::Node.new('/rosruby_sample_publisher')\npublisher = node.advertise('/chatter', Std_msgs::String)\n\nmsg = Std_msgs::String.new\n\ni = 0\nwhile node.ok?\n  msg.data = \"Hello, rosruby!: #{i}\"\n  publisher.publish(msg)\n  sleep(1.0)\n  i += 1\nend\n```\n\nNote\n----------------\nRuby requires 'Start with Capital letter' for class or module names.\nSo please use **S**td_msgs::String class instead of **s**td_msgs::String.\nrosruby message compiler automatically generates messages by the rule.\n\n\nSamples\n----------------------\nThere are [rosruby_common](https://github.com/OTL/rosruby_common) that contains actionlib and tutorials.\n\nDo all tests\n-------------------------\n\n[![Build Status](https://secure.travis-ci.org/OTL/rosruby.png)](http://travis-ci.org/OTL/rosruby)\n\nInstall some packages for tests.\n\n```bash\n$ sudo apt-get install rake gem\n$ sudo gem install yard redcarpet simplecov\n```\n\nrun tests.\n\n```bash\n$ rake test\n```\n\nDocuments\n--------------------------\nyou can generate API documents using yard.\nDocument generation needs yard and redcarpet.\nYou can install these by gem command like this.\n\n```bash\n$ gem install yard redcarpet\n```\n\nThen try to generate documentds.\n\n```bash\n$ rake yard\n```\n\nYou can access to the generated documents from [here](http://otl.github.com/rosruby/doc/).\n\n\ncatkin and CMakeLists.txt\n-----------------------------\n\nrosruby's CMakeLists.txt defines some macros for your package that uses rosruby.\nyou can use these if you add `find_package(rosruby)` to CMakeLists.txt.\n\n* rosruby_setup() : setup some macros and variables for rosruby\n* rosruby_generate_messages(message_pkg1 message_okg2 ...) : generates rosruby msg/srv files\n* rosruby_add_libraries(files or dirs) : install lib files for devel environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotl%2Frosruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotl%2Frosruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotl%2Frosruby/lists"}