jsk-ros-pkg / jsk_model_tools

JSK model utilities
https://github.com/jsk-ros-pkg/jsk_model_tools
BSD 3-Clause "New" or "Revised" License
5 stars 27 forks source link

[eusurdf] use package://eusurdf instead of model:// #195

Closed furushchev closed 7 years ago

furushchev commented 7 years ago

to keep compatibility with ros system (ros node cannot resolve mesh path from model:// directive.)

mmurooka commented 7 years ago

Is this work in gazebo? As far as I remember, it does not.

furushchev commented 7 years ago

@mmurooka Yes, at least in indigo. 2017年1月9日(月) 20:36 Masaki Murooka notifications@github.com:

Is this work in gazebo? As far as I remember, it does not.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jsk-ros-pkg/jsk_model_tools/pull/195#issuecomment-271264023, or mute the thread https://github.com/notifications/unsubscribe-auth/AB0B0BBTdc4MkUEYHbp6LPGblNc-EtlCks5rQhu2gaJpZM4LeGq2 .

-- -- ⌘ Yuki Furuta

mmurooka commented 7 years ago

I see. Should hydro be supported? If so, we need check.

If you use package:// instead of model://, https://github.com/jsk-ros-pkg/jsk_model_tools/blob/master/eusurdf/package.xml#L30-L31 is no longer necessary?

furushchev commented 7 years ago

@mmurooka

Should hydro be supported?

I think no one use gazebo in hydro...

https://github.com/jsk-ros-pkg/jsk_model_tools/blob/master/eusurdf/package.xml#L30-L31 is no longer necessary?

This is now not necessary for spawning model to gazebo from command line, but it will be necessary when we spawn models via gzclient.

mmurooka commented 7 years ago

spawn models via gzclient

Sorry, but cloud you explain detail? Do you mean GUI in Gazebo window?

And one more question, in my understanding, you have textured models in textured_model directory, and when include object model, first search in textured model and then (not textured) model. How do you do this with using package://?

furushchev commented 7 years ago

@mmurooka

Sorry, but cloud you explain detail? Do you mean GUI in Gazebo window?

Yes. GUI in Gazebo Window I mean.

And one more question, in my understanding, you have textured models in textured_model directory, and when include object model, first search in textured model and then (not textured) model. How do you do this with using package://?

I found the critical problem after reading this question. I misunderstand that gazebo in indigo supports package:// directive but it is converted to absolute path by gazebo_ros plugin and gazebo itself does not support this. (so spawning model files with world file always fails).

We now support spawning room model without world file (https://github.com/jsk-ros-pkg/jsk_model_tools/pull/193) though, it could be problem.

Just question: if you move to use launch file to spawn room model instead of world file, will it be easy?

mmurooka commented 7 years ago

Just question: if you move to use launch file to spawn room model instead of world file, will it be easy?

We need to modify some files under start-jsk/rtmros_gazebo and rtmros_tutorials

This is launch file for simulate HRP2 on gazebo: https://github.com/start-jsk/rtmros_tutorials/blob/master/hrpsys_gazebo_tutorials/launch/gazebo_hrp2jsk_no_controllers.launch https://github.com/start-jsk/rtmros_gazebo/blob/master/hrpsys_gazebo_general/launch/gazebo_robot_no_controllers.launch

It use world file as world and robot_description for robot. If world file is not supported, these files become not working.

mmurooka commented 7 years ago

Talking @furushchev offline, and I agree that using object urdf as marker in Rviz is useful, and replace model:// with package:// is necessary for that.

I'm happly if @furushchev updates HRP2/JAXON/SampleRobot gazebo environment to work with this PR.

mmurooka commented 7 years ago

I think no one use gazebo in hydro...

I don't use gazebo in hydro, and don't know other members who use gazebo in hydro. But you need to be careful about that. e.g. https://github.com/jsk-ros-pkg/jsk_pr2eus/issues/274#issuecomment-269140105

furushchev commented 7 years ago

@mmurooka Thank you for listing up possible problems and many insights. I now updated pull request. Points are:

@mmurooka Is this reasonable for you?

mmurooka commented 7 years ago

@mmurooka Is this reasonable for you?

Yes. If you check both of world-type and spawn-type is working, it is OK. (and please check world-type + HRP2 if you can)

furushchev commented 7 years ago

@mmurooka

roslaunch gazebo_ros empty_world.launch
roslaunch eusurdf gazebo_spawn_scene.launch scene:=room73b2

and

roslaunch gazebo_ros empty_world.launch world_name:= `rospack find eusurdf`/worlds/room73b2.world

Both are working fine.

Also

roslaunch hrpsys_gazebo_tutorials gazebo_hrp2jsknt_no_controllers.launch WORLD:=`rospack find eusurdf`/worlds/room73b2.world

successfully spawned robot and scene, but robot collides with door. Is this expected?

mmurooka commented 7 years ago

successfully spawned robot and scene, but robot collides with door. Is this expected?

Yes, it is expected, (and need to be fixed).

Now this PR is ok for me.

k-okada commented 7 years ago

Do you think we can drop hydro support on this repository???

2017年1月10日(火) 16:24 Masaki Murooka notifications@github.com:

successfully spawned robot and scene, but robot collides with door. Is this expected?

Yes, it is expected, (and need to be fixed).

Now this PR is ok for me.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jsk-ros-pkg/jsk_model_tools/pull/195#issuecomment-271504656, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeG3H540QCTVs76KsnJcwK_SoG8gRHbks5rQzJDgaJpZM4LeGq2 .

mmurooka commented 7 years ago

This repo contains some essential packages for robot model conversion and some robots still use hydro, so I think it is preferable to keep support for hydro if possible.

as @furushchev mentions in https://github.com/jsk-ros-pkg/jsk_model_tools/pull/195#issuecomment-271465974 , there is no difference between indigo and hydro as for object insertion to gazebo. So this package can keep both support for hydro and indigo after merge this PR.