Coder Social home page Coder Social logo

rosparam_expose's Introduction

rosparam_expose

  • Exposes ROS1 Parameter Server operations as ROS Services
  • Provides a rosparam like CLI that can call these ROS Services

Build and Run

mkdir -p catkin_ws/src
cd catkin_ws
git clone https://github.com/shivamMg/rosparam_expose src/rosparam_expose
rosdep install --from-paths src/rosparam_expose
catkin_make
roslaunch rosparam_expose server.launch  # start server

# From a separate terminal
. catkin_ws/devel/setup.bash
rosservice list  # should show all services under /rosparam_expose/
rosservice call /rosparam_expose/set foo bar
rosservice call /rosparam_expose/get foo  # should print: value: "bar"

# rosparam-like CLI to call rosparam_expose services
# create a yaml
cat > load.yaml <<EOM
a: b
c: [1, 2]
d: false
EOM

rosrun rosparam_expose client load load.yaml /example
rosrun rosparam_expose client dump dump.yaml /example
cat dump.yaml  # should have same contents as load.yaml

# see example.launch for <rosparam/> tag examples
cat $(rospack find rosparam_expose)/launch/example.launch

Run on rapyuta.io

  1. Import example package using:

The package has a server and a client component. Server starts rosparam_expose server. Client component executable just sleeps infinitely. Both components have separate ROS masters but are connected via Cloud Bridge. So ROS services exposed at Server component should be available at Client component.

  1. After the imported package is successfully built, deploy it.
  2. Let the deployment go to Status: Running then go to Shell Access tab.
  3. SSH into client and run the following commands:
bash
. /opt/catkin_ws/devel/setup.bash
rosservice list  # you should see /rosparam_expose services
cat $(rospack find rosparam_expose)/configs/example.yaml  # example yaml that we'll load at server
rosrun rosparam_expose client load $(rospack find rosparam_expose)/configs/example.yaml /configs
  1. Now go back to Shell Access tab, and SSH into server and run the following commands:
bash
. /opt/catkin_ws/devel/setup.bash
rosparam get /configs  # should be same as example.yaml from above

rosparam_expose's People

Contributors

shivammg avatar

Watchers

 avatar  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.