8000 Adds stdio Support to rosparam (supercedes #684) by evenator · Pull Request #686 · ros/ros_comm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds stdio Support to rosparam (supercedes #684) #686

Closed
wants to merge 6 commits into from

Conversation

evenator
Copy link
Contributor

I am recreating this PR because the previous one (#684) seems to have broken when I rebased the branch.

rosparam dump to stdout is useful for piping the rosparam yaml output to other programs. This PR changes the behavior of rosparam dump such that if a user does not specify a filename to the command, rosparam will dump to stdout.

rosparam load from stdin is useful for piping yaml into rosparam. This PR changes the behavior of rosparam load such that if the user specifies "-" as the filename, rosparam will load from stdin.

My particular usecase for rosparam load from stdin is being able to only load parameters from a launch file:

roslaunch robot.launch --dump-params | rosparam load -

Edward Venator added 2 commits October 14, 2015 13:37
If no filename is passed to rosparam load or if '-' is passed as
the filename, rosparam will attempt to read yaml from stdin. This
allows piping yaml into rosparam.
If no filename is specified to rosparam dump or if the filename is
"-", dumps the rosparam yaml to stdout, allowing it to be piped
into other programs.
@ros-pull-request-builder
Copy link
Member

Can one of the admins verify this patch?

@evenator
Copy link
Contributor Author

Ok, I know what's going wrong here, and fix will be up soon.

* Changes test for rosparam dump to no longer require a file arg
* No longer allow "-" as shorthand for rosparam dump to stdout, as
  this doesn't make much sense. Just use `rosparam dump` with no
  file arg
* No long allow rosparam load with no file argument, as invoking
  it with no piped stdin causes the program to hang until EOF is
  sent, which would likely confuse the user. Instead, require the
  user to explicitly specify "-" as the file for stdin.
@dirk-thomas
Copy link
Member

@ros-pull-request-builder
Copy link
Member

Test failed.
Refer to this link for build results: http://jenkins.ros.org/job/_pull_request-indigo-ros_comm/421/

@evenator
Copy link
Contributor Author

I'll work on fixing these tests (and adding tests for the new functionality) as soon as I get a chance.

Still need to add tests for new functionality.
@ros-pull-request-builder
Copy link
Member

Test failed.
Refer to this link for build results: http://jenkins.ros.org/job/_pull_request-indigo-ros_comm/435/

@ros-pull-request-builder
Copy link
Member

Test passed.
Refer to this link for build results: http://jenkins.ros.org/job/_pull_request-indigo-ros_comm/436/

@evenator
Copy link
Contributor Author

@dirk-thomas This is ready for review.

@dirk-thomas
Copy link
Member
dirk-thomas < 8000 /strong> commented Mar 3, 2016

@ros-pull-request-builder retest this please

@dirk-thomas
Copy link
Member

@ros-pull-request-builder retest this please (this time with a rebase)

@dirk-thomas
Copy link
Member

Can you please resolve the merge conflicts.

@evenator
Copy link
Contributor Author
evenator commented Mar 3, 2016

I merged it. I can rebase if you'd prefer.

@dirk-thomas
Copy link
Member

Thank you. I squashed the changes and cherry-picked them in 5dcfc8e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0