-
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
[pr2eus_tutorials] fix pr2_tabletop.launch for remote PC #459
Conversation
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.
Thank you very much for your work!
How about integrating pr2_tabletop_remote.launch
into pr2_tabletop.launch
?
<launch>
<arg name="remote" default="false" />
...
</launch>
Then, write to README.md about the remote
option.
https://github.com/jsk-ros-pkg/jsk_pr2eus/tree/master/pr2eus_tutorials#using-a-real-robot
Then, I will check this launch on real robot.
Thank you for your advice! So like this? I'm not sure the grammer "unless" and "if". |
Yes, nice. I think we can use
As another point, I found that we may need to prepare |
Thank you for your comment. |
OK, at last, please update |
OK done. |
Could you also write your
https://github.com/jsk-ros-pkg/jsk_pr2eus/tree/master/pr2eus_tutorials#using-a-real-robot Then, I think this PR is perfect. I will check this PR today. |
@@ -5,11 +5,25 @@ | |||
<arg name="manager" default="pr2_tabletop_object_detector_nodelet_manager"/> | |||
<arg name="machine" default="c2" /> |
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.
If you use this launch file from remote, machine is localhost?
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.
Fix with 791eb86
<arg name="PROSILICA_IMAGE" value="/prosilica/image_raw" /> | ||
<arg name="PROSILICA_IMAGE_REMOTE" value="/prosilica_remote/image_raw" /> | ||
<arg name="POINT_CLOUD" value="/kinect_head/depth_registered/throttled/points" /> | ||
<arg name="POINT_CLOUD_REMOTE" value="/kinect_head_remote/depth_registered/points" /> | ||
|
||
<include file="$(find pr2_machine)/$(env ROBOT).machine" unless="$(arg load_machine)" /> |
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.
We do not need this line if we use remote?
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.
Thank you, you mean summing up remote topics and the other topics with <group>
tag is more readable ?
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.
Or you mention <include file="$(find pr2_machine)/$(env ROBOT).machine" unless="$(arg load_machine)" />
?
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.
Or you mention ?
Yes, I mention this line.
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.
Ok, fix by 791eb86
machine="$(arg machine)"> | ||
<remap from="~points" to="/kinect_head/depth_registered/throttled/points" /> | ||
<remap from="~point" to="/kinect_head/rgb/throttled/image_rect_color/screenpoint" /> | ||
<group if="$(arg remote)"> |
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.
I think <group if="$(arg remote)">
should include xxx_decompress nodes and depth_image_proc nodes, not screenpoint.
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.
</group> | ||
|
||
<node name="prosilica_decompress" pkg="image_transport" type="republish" | ||
args="compressed in:=$(arg PROSILICA_IMAGE) out:=$(arg PROSILICA_IMAGE_REMOTE)" /> |
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.
in and out should be in remap tag
args="compressed raw"
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.
Thank you for the review. You mean using remap tag enables more readable ? Putting them together with args is not formal ?
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.
You mean using remap tag enables more readable ? Putting them together with args is not formal ?
Yes, I think using remap tag is readable and easy to understand.
args can do many roles (e.g. rosparam, remap, special keys, ...).
So I think using specific tag is easy to understand.
https://wiki.ros.org/Remapping%20Arguments
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.
I see, thank you for the reference. Fix with 78880de
<node name="prosilica_decompress" pkg="image_transport" type="republish" | ||
args="compressed in:=$(arg PROSILICA_IMAGE) out:=$(arg PROSILICA_IMAGE_REMOTE)" /> | ||
<node name="rgb_decompress" pkg="image_transport" type="republish" | ||
args="compressed in:=$(arg RGB_IMAGE) out:=$(arg RGB_IMAGE_REMOTE)" /> |
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.
in and out should be in remap tag
args="compressed raw"
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.
Fix by 78880de
<node name="rgb_decompress" pkg="image_transport" type="republish" | ||
args="compressed in:=$(arg RGB_IMAGE) out:=$(arg RGB_IMAGE_REMOTE)" /> | ||
<node name="depth_decompress" pkg="image_transport" type="republish" | ||
args="compressedDepth in:=$(arg DEPTH_IMAGE) out:=$(arg DEPTH_IMAGE_REMOTE)" /> |
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.
in and out should be in remap tag
args="compressedDepth raw"
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.
Fix by 78880de
<arg name="PROSILICA_IMAGE" value="/prosilica/image_raw" /> | ||
<arg name="PROSILICA_IMAGE_REMOTE" value="/prosilica_remote/image_raw" /> | ||
<arg name="POINT_CLOUD" value="/kinect_head/depth_registered/throttled/points" /> | ||
<arg name="POINT_CLOUD_REMOTE" value="/kinect_head_remote/depth_registered/points" /> |
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.
If you use kinect_head
and kinect_head_remote
many times, you can use tag
(If you do not like the group tag, I think it's ok not to use the group tag)
example:
https://github.com/jsk-ros-pkg/jsk_recognition/blob/master/jsk_pcl_ros/launch/openni2_remote.launch
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.
I agree with you.
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.
Fix with 8183683
Thank you for thorough review @708yamaguchi -san, I fixed code you mentioned. I will confirm it works with real PR2 this week end. Please wait for a while. |
<arg name="load_machine" default="false" unless="$(arg remote)" /> | ||
<arg name="load_machine" default="true" if="$(arg remote)" /> | ||
<arg name="machine" default="c2" unless="$(arg remote)" /> | ||
<arg name="machine" default="localhost" if="$(arg remote)" /> |
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.
default
-> value
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.
Thank you for your review.
Fix with 391e0bd
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.
pr2_tabletop.launch
is called by pr2_tabletop_sim.launch which is gazebo simulator tabletop tutorial. So I've changed the code back from value
to default
. ( 408fcec )
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.
this is because you add remote
arg in this PR.
in that case, you should change pr2_tabletop_sim.launch
to use remote
arg.
otherwise, machine
arg and remote
arg will conflict, which may be confusing.
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.
I suspect not.
When I execute pr2_tabletop_sim.launch
, machine
arg and remote
arg aren't conflicted.
This is because machine
arg in pr2_tabletop.launch
is always overwritten by that in pr2_tabletop_sim.launch
no matter which machine
arg is.
Also, settingremote
arg true in pr2_tabletop_sim.launch
might makes users confused since remote access is not related to gazebo simulation.
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.
そういう意味ではなく,ややこしいのでremote
を追加するんだったら,そちらに統一,そうじゃないのであればmachine
を使う,という風に統一してください.
あとの人がこんがらがるので.
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.
pr2_tabletop_sim.launch から pr2_tabletop.launch を呼び出すときに,remote
arg を true
にして良いということでしょうか.
その場合,procilica, rgb, depth をdecompress してpointcloudを再構成しますでしょうか.
私としては,pr2_tabletop_sim.launch では,machine
arg を localhost
に,load_machine
arg を true
にするという意味では,ご指摘なさった部分は,remote
arg が true となるのですが,
procilica, rgb, depth をdecompress してpointcloudを再構成する必要性はないと思っており,この意味ではremote
arg は false
に相当すると考えています.
その場合,remote
arg とは別に,use_sim
arg を新たに作って場合分けするべきでしょうか.
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.
@knorth55 さんに修正して頂き,use_sim
ではなくsim
arg を新たに作って場合わけをすることになりました.
I confirmed it works with real PR2 both via ssh and on remote PC. |
<arg name="PROSILICA_IMAGE" value="/prosilica/image_raw" /> | ||
<arg name="PROSILICA_IMAGE_REMOTE" value="/prosilica_remote/image_raw" /> | ||
<arg name="POINT_CLOUD" value="/$(arg camera_name)/depth_registered/throttled/points" /> | ||
<arg name="POINT_CLOUD_REMOTE" value="/$(arg camera_name)_remote/depth_registered/points" /> |
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.
<arg name="DEPTH_IMAGE" value="/$(arg camera_name)/depth_registered/image_rect" />
should be
<arg name="DEPTH_IMAGE" value="/$(arg camera_name)/depth_registered/throttled/image_rect" />
?
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.
Yes, thank you.
Fix by bc63138 .
I left 1 comment, but this PR works nicely with ssh mode and remote mode. Thank you for your work! |
Again I confirmed it works with gazebo mode, ssh mode and remote mode. |
<arg name="load_machine" default="false" unless="$(arg remote)" /> | ||
<arg name="load_machine" default="true" if="$(arg remote)" /> | ||
<arg name="machine" default="c2" unless="$(arg remote)" /> | ||
<arg name="machine" default="localhost" if="$(arg remote)" /> |
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.
this is because you add remote
arg in this PR.
in that case, you should change pr2_tabletop_sim.launch
to use remote
arg.
otherwise, machine
arg and remote
arg will conflict, which may be confusing.
<arg name="PROSILICA_IMAGE_REMOTE" value="/prosilica_remote/image_raw" /> | ||
<arg name="POINT_CLOUD" value="/$(arg camera_name)/depth_registered/throttled/points" /> | ||
<arg name="POINT_CLOUD_REMOTE" value="/$(arg camera_name)_remote/depth_registered/points" /> | ||
<arg name="robot" value="$(optenv ROBOT sim)" if="$(eval arg('remote') or arg('sim'))" /> |
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.
You use eval
arg, but eval
can be used in kinetic or newer.
http://wiki.ros.org/roslaunch/XML
Our PR2 is indigo, so I think we cannot use this launch file with SSH mode.
(I am sorry if my understanding is wrong)
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.
that's true.
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.
The solution I only come up with is use if
arg or unless
arg instead of eval
arg?
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.
The solution I only come up with is use if arg or unless arg instead of eval arg?
I don't have any other ideas either....
By the way, do we really need load_machine
arg?
If we need to use load_machine
, please update README.md.
<include file="$(find pr2_machine)/$(arg robot).machine" if="$(arg load_machine)" />
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.
Sorry to be late.
By the way, do we really need load_machine arg?
No need anymore. I deleted it by 557aa9b .
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.
You use eval arg, but eval can be used in kinetic or newer.
I change if
arg or unless
arg instead of eval
arg by 5687bb5.
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.
I've never seen this writing style before, but it's interesting.
I hope this PR works well.
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.
Yes, I confirmed it works well with gazebo mode, ssh mode and remote mode.
This PR is intended to reduce the bandwidth.
It compresses prosilica image, rgb image, depth image and point cloud
in the pr2eus_tutorials.