Coder Social home page Coder Social logo

me477's Introduction

Repository Purpose

The purpose of this repository is to fullfill the requirements of the ME 477 ROS mini-course final as listed here

Requirements

These packages have been designed for use on systems with the following:

  1. ROS Melodic Morenia
  2. Ubuntu 18.04.4 LTS (Bionic Beaver).

Installation

In order to make these packages accessible within the ROS installation, the following steps must be completed:

  1. Create a ROS workspace with a src directory.
  2. Clone this repository to the src directory.
git clone https://github.com/Hegemon98/ME477.git
  1. In the workspace, make.
catkin_make
  1. Source the workspace.
source devel/setup.bash

ROS package: my_topics

The my_topics package contains four nodes:

  1. message_publisher.py: this node publishes a message with an imaginary and a real value
  2. message_subscriber.py: this node subscribes to message_publisher.py and displays the recieved values in the terminal
  3. topic_publisher.py: this node publishes a topic called counter which increments upward after every publish
  4. topic_subscriber.py: this node subscribes to topic_publisher.py and dispays the recieved values in the terminal

These nodes are usefull in demonstrating basic topic and message node functionality and communication and can be used as starting points for more advanced use cases.

Getting started with my_topics

roslaunch my_topics topics.launch

Using the above launch command, the four nodes within this package will launch and begin printing to the terminal. Expected output should resemble the following:

1
Real: 0.021548465
Imaginary: 0.984262465

For individual usage of these nodes the following command format may be used with roscore running in another terminal.

rosrun <package name> <node name>

Example:

rosrun my_topics topic_publisher.py

Usage

It should be noted that the subscriber files will not be functional without also having their associated publisher file also running.

ROS package: my_services

The my_services package contains two nodes:

  1. service_client.py: this node accepts strings of characters from the user via the command line, counts the number of words, and outputs the result.
  2. service_server.py: this node contains a service called word_count which is used by service_client.py to count the number of input words.

These nodes are usefull in demonstrating basic service node functionality and communication and can be used as starting points for more advanced use cases.

Getting started with my_services

roslaunch my_services services.launch input:='<insert text here>'

Using the above launch command, the two nodes within this package will launch and begin printing to the terminal. Expected output should resemble the following:

user input--> has 2 words

For individual usage of these nodes the following command format may be used with roscore running in another terminal.

rosrun <package name> <node name> <user input>

Example:

rosrun my_services service_client.py hello world

Usage

It should be noted that the user input argument should only be used when calling the client. Additionally, strings containing a double underscore __ will be filtered out and therefore should not be entered into this node. This is done to filter out extra command line entries that occur when using this node within a launch file.

ROS package: my_actions

The my_actions package contains two nodes:

  1. fancy_action_client.py: this node communicates with fancy_action_server.py using the variables established in Timer.action located in my_actions/action. It also outputs recieved values to the terminal.
  2. fancy_action_server.py: this node returns the time elapsed and remaining time based on the goal.time_to_wait variable field within fancy_action_client.py.

These nodes are usefull in demonstrating uses of .action file functionality and can be used as a starting point for more advanced use cases.

Getting started with my_actions

roslaunch my_actions fancy_action.launch

Using the above launch command, the two nodes within this package will launch and begin printing to the terminal. Expected output should resemble the following:

[Feedback] Time elapsed: 0.000023
[Feedback] Time remaining: 4.999977

Usage

The goal.time_to_wait variable field within fancy_action_client.py may be edited in order to increase the amount of time available for execution of these nodes.

me477's People

Contributors

hegemon98 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.