Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ ros2 launch robotnik_gazebo_classic spawn_robot.launch.py
| namespace | robot | namespace that will be in the nodes and topics and differenciate one robot entity from another |
| robot | rbkairos | robot type desired to be spawned |
| robot_model | _value of robot argument_ | robot_model variation of the robot type. For using this argument, robot has to be fulfilled |
| robot_xacro_path | rbkairos/rbkairos.urdf.xacro | path to a xacro model if it is not included in the robot_description package |
| robot_xacro_path | rbkairos/rbkairos.urdf.xacro | path to a xacro model if it is not included in the robotnik_description package |
| x | 0.0 | position x in the Gazebo world to spawn the robot |
| y | 0.0 | position y in the Gazebo world to spawn the robot |
| z | 0.0 | position z in the Gazebo world to spawn the robot |
Expand All @@ -179,7 +179,7 @@ Example:
ros2 launch robotnik_gazebo_classic spawn_robot.launch.py robot:=rbvogui
```

In case that your robot has a variation (check [robots](robotnik_pkgs/robot_description/robots/) folder in robot_description package), you can select it by the argument **robot_model**.
In case that your robot has a variation (check [robots](robotnik_pkgs/robot_description/robots/) folder in robotnik_description package), you can select it by the argument **robot_model**.

Example:
```sh
Expand Down Expand Up @@ -219,15 +219,15 @@ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-arg cmd_vel:=/robot/r
<!-- CUSTOMIZATION -->
## Custom Simulation

In case that the robot model that you want to simulate is not in robot_description package, or the world, or you want to use a different controller, you will have to create your own simulaiton files.
In case that the robot model that you want to simulate is not in robotnik_description package, or the world, or you want to use a different controller, you will have to create your own simulaiton files.

This will guide you to create your custom simulation.

### Custom Robot Model

1. First, create your own package for the project.
2. In this package, create your URDF file. You can base in the [template file](robotnik_pkgs/robot_description/robots/robot_template.urdf.xacro) that are in robot_description package.
3. In the README of [robot_description](robotnik_pkgs/robot_description/README.md) there is a brief descripiton on how to create a robot.
2. In this package, create your URDF file. You can base in the [template file](robotnik_pkgs/robotnik_description/robots/robot_template.urdf.xacro) that are in robotnik_description package.
3. In the README of [robotnik_description](robotnik_pkgs/robotnik_description/README.md) there is a brief descripiton on how to create a robot.
4. On this file you can modify and add all the sensors, arms and any other component.
5. Then, launch the spawn_robot with the argument _robot_xacro_path_.

Expand Down
4 changes: 2 additions & 2 deletions robotnik_gazebo_classic/launch/spawn_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def generate_launch_description():
arg = ExtendedArgument(
name='robot_xacro_path',
description='Path to the xacro file',
default_value=[FindPackageShare('robot_description'), '/robots/', robot_xacro_file],
default_value=[FindPackageShare('robotnik_description'), '/robots/', robot_xacro_file],
)
add_to_launcher.add_arg(arg)

Expand All @@ -107,7 +107,7 @@ def generate_launch_description():

params = add_to_launcher.process_arg()

robot_dir = os.path.join(get_package_share_directory('robot_description'), 'launch')
robot_dir = os.path.join(get_package_share_directory('robotnik_description'), 'launch')

robot_state = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
Expand Down
4 changes: 2 additions & 2 deletions robotnik_gazebo_classic/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<exec_depend>robotnik_sensors</exec_depend>
<exec_depend>robotnik_msgs</exec_depend>
<exec_depend>robotnik_common</exec_depend>
<exec_depend>robot_description</exec_depend>
<exec_depend>robotnik_description</exec_depend>
<exec_depend>ur_description</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
<gazebo_ros gazebo_model_path="${prefix}/../../../robot_description/share"/>
<gazebo_ros gazebo_model_path="${prefix}/../../../robotnik_description/share"/>
</export>
</package>
<!-- This package was generated using the Turtle Nest ROS 2 package creator -->
4 changes: 2 additions & 2 deletions robotnik_gazebo_ignition/launch/spawn_robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def generate_launch_description():
arg = ExtendedArgument(
name='robot_xacro_path',
description='Path to the xacro file',
default_value=[FindPackageShare('robot_description'), '/robots/', robot_xacro_file],
default_value=[FindPackageShare('robotnik_description'), '/robots/', robot_xacro_file],
use_env=True,
environment='ROBOT_XACRO_PATH',
)
Expand Down Expand Up @@ -115,7 +115,7 @@ def generate_launch_description():
add_to_launcher.add_arg(arg)
params = add_to_launcher.process_arg()

robot_dir = os.path.join(get_package_share_directory('robot_description'), 'launch')
robot_dir = os.path.join(get_package_share_directory('robotnik_description'), 'launch')

robot_state = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
Expand Down
2 changes: 1 addition & 1 deletion robotnik_gazebo_ignition/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<export>
<build_type>ament_cmake</build_type>
<gazebo_ros gazebo_model_path="${prefix}/../../../robot_description/share"/>
<gazebo_ros gazebo_model_path="${prefix}/../../../robotnik_description/share"/>
</export>
</package>
<!-- This package was generated using the Turtle Nest ROS 2 package creator -->