Open danzimmerman opened 1 year ago
I see this is already discussed in https://github.com/UniversalRobots/Universal_Robots_ROS2_Description/pull/15
I'm using gazebo_ros_pkgs
version 3.7.0 and it looks like spawn_entity.py
accepts a -package_to_model
argument.
In ur_sim_control.py
I can spawn with
gazebo_spawn_robot = Node(
package="gazebo_ros",
executable="spawn_entity.py",
name="spawn_ur",
arguments=["-entity", "ur", "-topic", "robot_description", "-package_to_model"],
output="screen",
)
If I hardcode force_abs_paths
to false
in ur_macro.xacro
(to make sure the appropriate ros2_control
content still gets loaded via passing sim_gazebo:=true
) and it seems I get a robot in Gazebo and in RViz on my remote machine.
On closer inspection it looks like -package_to_model
doesn't work reliably, and on repeated launches I don't see a robot in Gazebo
Ah, now I notice that I didn't have GAZEBO_MODEL_PATH
set correctly.
The -package_to_model
flag does allow me to visualize in both Gazebo and RViz (local or remote) if I properly add the install location of ur_description
to GAZEBO_MODEL_PATH
I was appending a defunct colcon workspace to my GAZEBO_MODEL_PATH
. Updating that to the correct location of ur_description
works.
Hi @danzimmerman
Did you use this package to simulate a Robot with the gazebo-package or is this the default option for the gazebo repo?
Do you know how to use the gazebo-repo with a customized version of this description-repo?
Do you know how to use the gazebo-repo with a customized version of this description-repo?
Yes, you could try building the following branches of my forks of this description repo and the Gazebo repo:
Check out the dz/expose-joint-dyn-prop-file
branch of https://github.com/danzimmerman/Universal_Robots_ROS2_Description
and check out the dz/expose-joint-dyn-props
branch of https://github.com/danzimmerman/Universal_Robots_ROS2_Gazebo_Simulation
This is more related to #56 in this repo.
This issue here is just about visualizing when RViz is on a remote machine. I think there's a straightforward fix but there's a lot of this stuff that should probably wait for something like #59 and build from there.
I'm trying to work with https://github.com/UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation/ to look into Issue #19
Expected Behavior
After I launch the Gazebo simulation on one computer, I can visualize the robot in RViz on another computer on the same network, similar to the behavior I see with
ur_robot_driver
.Actual Behavior
Robot meshes are not visible in RViz on a remote machine because the mesh URIs in
/robot_description
are notpackage:///
URIs. Instead, they refer to concrete absolute paths asfile:///
URIs on the simulation machine.RViz Remote Machine Error Messages
/tf
transforms and other topics are not a problem:Details
This behavior is clearly intentional, per
force_abs_paths
here:https://github.com/UniversalRobots/Universal_Robots_ROS2_Description/blob/ros2/urdf/ur_macro.xacro#L99
I suppose this is necessary for the URDF -> SDF conversion process to spawn the model in Gazebo Classic or Gazebo (Ignition flavor), like here, but it does break other uses of
/robot_description
.