Skip to content

Exposes ROS1 Parameter Server operations as ROS Services

License

Notifications You must be signed in to change notification settings

shivamMg/rosparam_expose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Exposes ROS1 Parameter Server operations as ROS Services

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published