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
32 changes: 32 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Rolling - pre-release
# author: Christoph Froehlich <[email protected]>

on:
workflow_dispatch:
inputs:
downstream_depth:
description: 'The depth of the depends-on tree to be included in the overlay workspace (-1 implies unlimited, default: 0)'
required: false
default: 0
type: number
pull_request:
branches:
- main
types:
- opened # default
- reopened # default
- synchronize # default
- labeled # also if a label changes

jobs:
default:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [jazzy, kilted] #, rolling] # rolling is currently disabled due to the timeout issues in CI

uses: ros-controls/ros2_control_ci/.github/workflows/reusable-prerelease.yml@master
with:
ros_distro: ${{ matrix.ROS_DISTRO }}
# downstream_depth is not set on pull_request event
prerelease_downstream_depth: ${{ github.event_name == 'pull_request' && '0' || inputs.downstream_depth }}
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ install(PROGRAMS
install(
DIRECTORY resources scripts
DESTINATION share/${PROJECT_NAME}
USE_SOURCE_PERMISSIONS
)

pluginlib_export_plugin_description_file(hardware_interface mujoco_system_interface_plugin.xml)
Expand Down
11 changes: 7 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>backward_ros</depend>
<depend>control_toolbox</depend>
<depend>controller_manager</depend>
<depend>hardware_interface</depend>
<depend>nav_msgs</depend>
<depend>libglfw3-dev</depend>
<depend>pluginlib</depend>
<depend>rclcpp</depend>
<depend>python3-pykdl</depend>
<depend>rclcpp_lifecycle</depend>
<depend>rclcpp</depend>
<depend>sensor_msgs</depend>
<depend>control_toolbox</depend>
<depend>transmission_interface</depend>
<depend>backward_ros</depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>launch_testing_ament_cmake</test_depend>
<test_depend>joint_state_broadcaster</test_depend>
<test_depend>robot_state_publisher</test_depend>
<test_depend>position_controllers</test_depend>
<test_depend>gripper_controllers</test_depend>
<test_depend>rviz2</test_depend>
<test_depend>urdfdom</test_depend>
<test_depend>urdfdom_py</test_depend>
Expand Down
5 changes: 5 additions & 0 deletions scripts/robot_description_to_mjcf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,10 @@ check_virtual_env
pkill -f make_mjcf_from_robot_description.py || true
check_dependencies

# check if the user just wants to install the dependencies or run the script
if [[ "$*" == *"--install-only"* ]]; then
exit 0
fi

# Get all the arguments of the bash script and then forward it to the make_mjcf_from_robot_description.py script
exec python3 "$(dirname "$0")/make_mjcf_from_robot_description.py" "$@"
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ add_launch_test(src/robot_launch_transmission_test.py
TIMEOUT 50
)

add_launch_test(src/robot_launch_tranmission_pid_test.py
add_launch_test(src/robot_launch_transmission_pid_test.py
TIMEOUT 50
)
15 changes: 14 additions & 1 deletion test/src/robot_launch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ def generate_test_description_common(use_pid="false", use_mjcf_from_topic="false
os.environ["USE_MJCF_FROM_TOPIC"] = use_mjcf_from_topic
os.environ["TEST_TRANSMISSIONS"] = test_transmissions

if use_mjcf_from_topic == "true":
# Setup the venv needed for the make_mjcf_from_robot_description node
os.system(
os.path.join(
get_package_share_directory("mujoco_ros2_control"),
"scripts/robot_description_to_mjcf.sh --install-only",
)
)

launch_include = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(
Expand Down Expand Up @@ -133,7 +142,11 @@ def test_arm(self):

msg = Float64MultiArray()
msg.data = [0.5, -0.5]
pub.publish(msg)
# This is needed to account for any missing message subscriptions
end_time = time.time() + 2
while time.time() < end_time:
pub.publish(msg)
time.sleep(0.1)

# Allow some time for the message to be processed
time.sleep(4.0)
Expand Down
Loading