Guest User

Untitled

a guest
Dec 11th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # Import rospy
  3. import rospy
  4. # Main dynamic reconfiguration files
  5. from dynamic_reconfigure.server import Server
  6. # Configuration made in the devel folder
  7. from intro_pkg1.cfg import SampleConfig
  8. # Callback function
  9. def callback(config, level):
  10. rospy.loginfo("Values: {0}, {1}, {2}, {3}, {4}".format(config.Integer_param,
  11. config.Double_param, config.String_param,
  12. "True" if config.Bool_param else "False", config.Size))
  13. return config
  14. # Main code
  15. if __name__ == "__main__":
  16. # Initialize the node
  17. rospy.init_node("python_configure", anonymous=True)
  18. # Server assignment
  19. srv = Server(SampleConfig, callback)
  20. # Spin the node
  21. rospy.spin()
Add Comment
Please, Sign In to add comment