-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix wide_stereo camera model parameters #426
Conversation
@YutoUchimi please look at #426, which at least support camera parameter for both pr1012 and pr1040,
|
Seeing pr2.l you committed, Also, camera parameters for PR1040 are not fixed.
|
1be1bfe
to
c70059f
Compare
@YutoUchimi added |
pr2eus/make-pr2-model-file.l
Outdated
|
||
(defun get-pr2-names () | ||
;; get list of rosparam | ||
(reverse (mapcan #'(lambda (x) (if (substringp "robot_description" x) (list (subseq x 1 (- (length x) (length "/robot_description")))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating, but error occurs while executing make-pr2-model-file-test.launch
: https://travis-ci.org/jsk-ros-pkg/jsk_pr2eus/jobs/627167295#L5569-L5580
So we have to change that test launch file like
diff --git a/pr2eus/test/make-pr2-model-file-test.launch b/pr2eus/test/make-pr2-model-file-test.launch
index a43362d..0fa2292 100644
--- a/pr2eus/test/make-pr2-model-file-test.launch
+++ b/pr2eus/test/make-pr2-model-file-test.launch
@@ -1,9 +1,11 @@
<launch>
- <arg name="PR2_NO" default="1012" />
- <rosparam command="load" file="$(find pr2eus)/test/pr$(arg PR2_NO)_urdf.yaml" param="robot_description"/>
- <node name="pr2_camera_info" pkg="rosbag" type="play"
- args="-l $(find pr2eus)/test/pr1012_camera_info.bag" />
+ <rosparam command="load" file="$(find pr2eus)/test/pr1012_urdf.yaml" param="/pr1012/robot_description"/>
+ <rosparam command="load" file="$(find pr2eus)/test/pr1040_urdf.yaml" param="/pr1040/robot_description"/>
+ <node name="pr1012_camera_info" pkg="rosbag" type="play"
+ args="--prefix=/pr1012 -l $(find pr2eus)/test/pr1012_camera_info.bag" />
+ <node name="pr1040_camera_info" pkg="rosbag" type="play"
+ args="--prefix=/pr1040 -l $(find pr2eus)/test/pr1040_camera_info.bag" />
<test test-name="make_pr2_model_file_test" pkg="roseus" type="roseus"
- args="$(find pr2eus)/test/make-pr2-model-file-test.l"
+ args="$(find pr2eus)/test/make-pr2-model-file-test.l"
time-limit="1800" />
-</launch>
\ No newline at end of file
+</launch>
(END)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- So we have to change that test launch file like
- So we have to fix this error, to keep backward compatibility for example b891ba4
and you fix did not test pr1040 case, so can you update the test code?
pr2eus/make-pr2-model-file.l
Outdated
"narrow_stereo/right" | ||
"wide_stereo/left" | ||
"wide_stereo/right" | ||
"l_forearm_cam" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please align indent.
6b7d974
to
b891ba4
Compare
… between robot and versions use python command to convert from robot_description string format to xml format, use lxml because of pretty function https://www.ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/, instead of minidom or ElementTree ``` python -c "import yaml; import datetime; from lxml import etree; comment=etree.Comment(datetime.datetime.today().strftime(' generated from pr1040 on %Y/%m/%d ')); urdf=etree.XML(yaml.load(open('pr1040_urdf.yaml').read())); print(etree.tostring(comment, pretty_print=True, xml_declaration=True)); print(etree.tostring(urdf, pretty_print=True, xml_declaration=False));" ```
17fbe8c
to
c1b65f4
Compare
…ed in test/pr2-ri-test.launch
… before (send *ri* :angle-vector-duration (send *ri* :state :potentio-vector) (send *pr2* :angle-vector) 5 1.0)
rewrited version #403, because it just replace pr1012 settings with pr1040
--
update pr10*_urdf.yaml for pretty format, for make it easy to compare between robot and versions
use python command to convert from robot_description string format to xml format, use lxml because of pretty function https://www.ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/, instead of minidom or ElementTree