ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Migrating a ROS 1 Gazebo model to ROS 2 Gazebo

asked 2022-02-14 07:31:46 -0600

jon.aztiria gravatar image

updated 2022-02-16 02:26:01 -0600

Hi all,

I'm new to ROS2 and I would like to migrate the ABB IRB120 robot of the following repo to ROS2: https://github.com/ros-industrial/abb....

I'm using ROS2 Dashing and Gazebo 9.19 in Ubuntu 18.04. My approach was to take advange of the .xacro descriptions and just adapt the .launch files. For these .launch files I've tried an automatic converter from ROS1 to ROS2 found on https://github.com/aws-robotics/ros2-... and I've also considered other ROS2 projects as reference. In addition, I've also edited the CMakeLists.txt and package.xml files following this Migration Guide: https://docs.ros.org/en/foxy/Contribu....

I'm trying to run the commands below.

cd ~/ros2_abb_ws
colcon build

source /opt/ros/dashing/setup.bash
source ~/ros2_abb_ws/install/setup.bash
ros2 launch abb_irb120_gazebo test2.launch.py # based on MARA robot

After some tests, I've obtained to see the robot description (links and joints) in Gazebo, based on the .launch file of https://github.com/AcutronicRobotics/.... However, the visual is not working. These are all the messages I'm obtaining in the terminal when launching.

[INFO] [launch]: All log files can be found below /home/usuario/.ros/log/2022-02-14-20-29-35-065662-ubuntu-4922
[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : urdf/irb120_3_58_dae.urdf
[INFO] [gazebo-1]: process started with pid [4932]
[INFO] [robot_state_publisher-2]: process started with pid [4933]
[INFO] [spawn_robot.py-3]: process started with pid [4934]
[robot_state_publisher-2] Initialize urdf model from file: /home/usuario/ros2_abb_ws/install/abb_irb120_gazebo/share/abb_irb120_gazebo/urdf/irb120_3_58_dae.urdf
[robot_state_publisher-2] Parsing robot urdf xml string.
[robot_state_publisher-2] Link base_link had 2 children
[robot_state_publisher-2] Link base had 0 children
[robot_state_publisher-2] Link link_1 had 1 children
[robot_state_publisher-2] Link link_2 had 1 children
[robot_state_publisher-2] Link link_3 had 1 children
[robot_state_publisher-2] Link link_4 had 1 children
[robot_state_publisher-2] Link link_5 had 1 children
[robot_state_publisher-2] Link link_6 had 1 children
[robot_state_publisher-2] Link flange had 1 children
[robot_state_publisher-2] Link tool0 had 0 children
[robot_state_publisher-2] got segment base
[robot_state_publisher-2] got segment base_link
[robot_state_publisher-2] got segment flange
[robot_state_publisher-2] got segment link_1
[robot_state_publisher-2] got segment link_2
[robot_state_publisher-2] got segment link_3
[robot_state_publisher-2] got segment link_4
[robot_state_publisher-2] got segment link_5
[robot_state_publisher-2] got segment link_6
[robot_state_publisher-2] got segment tool0
[robot_state_publisher-2] got segment world
[robot_state_publisher-2] Adding fixed segment from world to base_link
[robot_state_publisher-2] Adding fixed segment from base_link to base
[robot_state_publisher-2] Adding moving segment from base_link to link_1
[robot_state_publisher-2] Adding moving segment from link_1 to link_2
[robot_state_publisher-2] Adding moving segment from link_2 to link_3
[robot_state_publisher-2] Adding moving segment from link_3 to link_4
[robot_state_publisher-2] Adding moving segment from link_4 to link_5
[robot_state_publisher-2] Adding moving segment from link_5 to link_6
[robot_state_publisher-2] Adding fixed segment from link_6 to flange
[robot_state_publisher-2] Adding fixed segment from flange to tool0
[gazebo-1] Gazebo multi-robot simulator, version 11.10.1
[gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gazebo-1] Released under the Apache 2 License.
[gazebo-1] http://gazebosim.org
[gazebo-1] 
[gazebo-1] Gazebo multi-robot simulator, version 11.10.1
[gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gazebo-1] Released under the Apache 2 License.
[gazebo-1] http://gazebosim.org ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-14 09:39:54 -0600

Ktysai gravatar image

A hint... I'm not sure it is corrent. chech if that spawn_entity.py has #!/usr/bin/python3 is possible to not have the "3" at the end.

Good luck!

edit flag offensive delete link more

Comments

Thanks for the answer. However, I've checked the spawn_entity.py and it actually includes #!/usr/bin/env python3 in the beginning. I've updated the question with the new advances. I think I'm near, but not completely succeeding.

jon.aztiria gravatar image jon.aztiria  ( 2022-02-16 02:13:38 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-02-14 07:31:46 -0600

Seen: 416 times

Last updated: Feb 16 '22