Skip to content

A ROS node for publishing transforms w/ a set-transform service and persistent state

Notifications You must be signed in to change notification settings

schornakj/mutable_transform_publisher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mutable Transform Publisher

A ROS Node in the spirit of tf's static_transform_publisher but with a service to set the transform while running and the ability to persist changes if desired.

Dependencies

  • ROS
  • YAML-CPP

Usage

  1. Create a yaml file with the following syntax:
- parent: foo
  child: bar
  x: 0
  y: 1
  z: 2
  qx: 0
  qz: 0
  qy: 0
  qw: 1
- parent: foo
  child: baz
  x: 0
  y: 0
  z: 0
  qx: 0
  qy: 0
  qz: 0
  qw: 1
  1. Run the mutable_transform_pub node in mutable_transform_publisher and set the yaml_path argument.
rosrun mutable_transform_publisher mutable_transform_pub _yaml_path:=<PATH_TO_YOUR_YAML>
  1. While running, you can call the set_transform service of type mutable_transform_publisher::SetTranform.
rosservice call /set_transform "transform:
header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: 'foo'
child_frame_id: 'bar'
transform:
  translation:
    x: 0.0
    y: 0.0
    z: 0.0
  rotation:
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0"
  1. You can also use the set_transform service to add a new TF transform.

  2. When ROS shutsdown, if you have set the commit parameter (which defaults to true) the state of your publisher will be saved back to the yaml path.

Issues

  1. Need interface to set period of publishing. Should it be parameter, in the service call, or both?
  2. Need to make an explicit 'CreateTransform' service.

About

A ROS node for publishing transforms w/ a set-transform service and persistent state

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.8%
  • CMake 17.2%