From: Walter Fetter Lages Date: Thu, 8 May 2025 02:39:54 +0000 (-0300) Subject: Port to Jazzy. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=af88b953723d61f30faa22afbcfb35c60c7a6a18;p=twil.git Port to Jazzy. --- diff --git a/twil_2dnav/launch/gazebo.launch.xml b/twil_2dnav/launch/gazebo.launch.xml index 3afe2ad..d494253 100644 --- a/twil_2dnav/launch/gazebo.launch.xml +++ b/twil_2dnav/launch/gazebo.launch.xml @@ -1,7 +1,7 @@ - + diff --git a/twil_bringup/config/dynamics_linearizing_controller.yaml b/twil_bringup/config/dynamics_linearizing_controller.yaml index 6fa5662..f13808a 100644 --- a/twil_bringup/config/dynamics_linearizing_controller.yaml +++ b/twil_bringup/config/dynamics_linearizing_controller.yaml @@ -2,6 +2,7 @@ joint_state_broadcaster: ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster extra_joints: - caster_wheel_joint - caster_base_joint @@ -11,6 +12,7 @@ joint_state_broadcaster: dynamics_linearizing_controller: ros__parameters: + type: effort_controllers/DynamicsLinearizingController joints: - left_wheel_joint - right_wheel_joint diff --git a/twil_bringup/config/joint_effort_controller.yaml b/twil_bringup/config/joint_effort_controller.yaml index a27a7ec..d0dd1c2 100644 --- a/twil_bringup/config/joint_effort_controller.yaml +++ b/twil_bringup/config/joint_effort_controller.yaml @@ -1,5 +1,6 @@ joint_state_broadcaster: ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster extra_joints: - caster_wheel_joint - caster_base_joint @@ -9,10 +10,12 @@ joint_state_broadcaster: left_wheel_joint_effort_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: [left_wheel_joint] interface_name: effort right_wheel_joint_effort_controller: ros__parameters: + type: forward_command_controller/ForwardCommandController joints: [right_wheel_joint] interface_name: effort diff --git a/twil_bringup/config/joint_velocity_controller.yaml b/twil_bringup/config/joint_velocity_controller.yaml index 43f0748..c2fa9c8 100644 --- a/twil_bringup/config/joint_velocity_controller.yaml +++ b/twil_bringup/config/joint_velocity_controller.yaml @@ -1,5 +1,6 @@ joint_state_broadcaster: ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster extra_joints: - caster_wheel_joint - caster_base_joint @@ -9,12 +10,14 @@ joint_state_broadcaster: left_wheel_joint_velocity_controller: ros__parameters: + type: effort_controllers/JointVelocityController joint: left_wheel_joint pid: {p: 0.0, i: 0.0, d: 0.0} interface_name: effort right_wheel_joint_velocity_controller: ros__parameters: + type: effort_controllers/JointVelocityController joint: right_wheel_joint pid: {p: 0.0, i: 0.0, d: 0.0} interface_name: effort diff --git a/twil_bringup/config/nonsmooth_backstep_controller.yaml b/twil_bringup/config/nonsmooth_backstep_controller.yaml index 83aef65..d2d9afd 100644 --- a/twil_bringup/config/nonsmooth_backstep_controller.yaml +++ b/twil_bringup/config/nonsmooth_backstep_controller.yaml @@ -2,6 +2,7 @@ joint_state_broadcaster: ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster extra_joints: - caster_wheel_joint - caster_base_joint @@ -11,6 +12,7 @@ joint_state_broadcaster: nonsmooth_backstep_controller: ros__parameters: + type: effort_controllers/NonSmoothBackstepController joints: - left_wheel_joint - right_wheel_joint diff --git a/twil_bringup/config/nonsmooth_backstep_controller_step.yaml b/twil_bringup/config/nonsmooth_backstep_controller_step.yaml index 1e745e9..83b3474 100644 --- a/twil_bringup/config/nonsmooth_backstep_controller_step.yaml +++ b/twil_bringup/config/nonsmooth_backstep_controller_step.yaml @@ -2,6 +2,7 @@ joint_state_broadcaster: ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster extra_joints: - caster_wheel_joint - caster_base_joint @@ -11,6 +12,7 @@ joint_state_broadcaster: nonsmooth_backstep_controller: ros__parameters: + type: effort_controllers/NonSmoothBackstepController joints: - left_wheel_joint - right_wheel_joint diff --git a/twil_bringup/config/twist_mrac_linearizing_controller.yaml b/twil_bringup/config/twist_mrac_linearizing_controller.yaml index acfedd0..981dc91 100644 --- a/twil_bringup/config/twist_mrac_linearizing_controller.yaml +++ b/twil_bringup/config/twist_mrac_linearizing_controller.yaml @@ -2,6 +2,7 @@ joint_state_broadcaster: ros__parameters: + type: joint_state_broadcaster/JointStateBroadcaster extra_joints: - caster_wheel_joint - caster_base_joint @@ -11,6 +12,7 @@ joint_state_broadcaster: twist_mrac_linearizing_controller: ros__parameters: + type: effort_controllers/TwistMracLinearizingController joints: - left_wheel_joint - right_wheel_joint diff --git a/twil_bringup/launch/dynamics_linearizing_controller.launch.xml b/twil_bringup/launch/dynamics_linearizing_controller.launch.xml index d21e33a..da83b8a 100644 --- a/twil_bringup/launch/dynamics_linearizing_controller.launch.xml +++ b/twil_bringup/launch/dynamics_linearizing_controller.launch.xml @@ -23,8 +23,8 @@ + args="-p $(var config) dynamics_linearizing_controller"/> + args="-p $(var config) joint_state_broadcaster"/> diff --git a/twil_bringup/launch/gazebo.launch.xml b/twil_bringup/launch/gazebo.launch.xml index 2e5d498..ee9e592 100644 --- a/twil_bringup/launch/gazebo.launch.xml +++ b/twil_bringup/launch/gazebo.launch.xml @@ -25,7 +25,8 @@ - + + @@ -36,6 +37,7 @@ + diff --git a/twil_bringup/launch/gazebo8.launch.xml b/twil_bringup/launch/gazebo8.launch.xml index fa3a592..4ee590f 100644 --- a/twil_bringup/launch/gazebo8.launch.xml +++ b/twil_bringup/launch/gazebo8.launch.xml @@ -25,6 +25,7 @@ + @@ -36,6 +37,7 @@ + diff --git a/twil_bringup/launch/joint_effort_controller.launch.xml b/twil_bringup/launch/joint_effort_controller.launch.xml index 830c08d..5e0f4bb 100644 --- a/twil_bringup/launch/joint_effort_controller.launch.xml +++ b/twil_bringup/launch/joint_effort_controller.launch.xml @@ -23,11 +23,11 @@ + args="-p $(var config) left_wheel_joint_effort_controller"/> + args="-p $(var config) right_wheel_joint_effort_controller"/> + args="-p $(var config) joint_state_broadcaster"/> diff --git a/twil_bringup/launch/joint_velocity_controller.launch.xml b/twil_bringup/launch/joint_velocity_controller.launch.xml index cd7d396..163e91a 100644 --- a/twil_bringup/launch/joint_velocity_controller.launch.xml +++ b/twil_bringup/launch/joint_velocity_controller.launch.xml @@ -23,11 +23,11 @@ + args="-p $(var config) left_wheel_velocity_controller"/> + args="-p $(var config) right_wheel_velocity_controller"/> + args="-p $(var config) joint_state_broadcaster"/> diff --git a/twil_bringup/launch/nonsmooth_backstep_controller.launch.xml b/twil_bringup/launch/nonsmooth_backstep_controller.launch.xml index 44026cf..31c8ebf 100644 --- a/twil_bringup/launch/nonsmooth_backstep_controller.launch.xml +++ b/twil_bringup/launch/nonsmooth_backstep_controller.launch.xml @@ -23,8 +23,8 @@ + args="-p $(var config) nonsmooth_backstep_controller"/> + args="-p $(var config) joint_state_broadcaster"/> diff --git a/twil_bringup/launch/twist_mrac_linearizing_controller.launch.xml b/twil_bringup/launch/twist_mrac_linearizing_controller.launch.xml index 3cf65f9..5b77893 100644 --- a/twil_bringup/launch/twist_mrac_linearizing_controller.launch.xml +++ b/twil_bringup/launch/twist_mrac_linearizing_controller.launch.xml @@ -23,8 +23,8 @@ + args="-p $(var config) twist_mrac_linearizing_controller"/> + args="-p $(var config) joint_state_broadcaster"/> diff --git a/twil_description/config/ros_gz_bridge.yaml b/twil_description/config/ros_gz_bridge.yaml new file mode 100644 index 0000000..57b38d9 --- /dev/null +++ b/twil_description/config/ros_gz_bridge.yaml @@ -0,0 +1,61 @@ +- ros_topic_name: "/clock" + gz_topic_name: "/clock" + ros_type_name: "rosgraph_msgs/msg/Clock" + gz_type_name: "gz.msgs.Clock" +# subscriber_queue: 5 # Default 10 +# publisher_queue: 6 # Default 10 +# lazy: true # Default "false" + direction: GZ_TO_ROS # Default "BIDIRECTIONAL" - Bridge both directions + # "GZ_TO_ROS" - Bridge Ignition topic to ROS + # "ROS_TO_GZ" - Bridge ROS topic to Ignition + +# nav_msgs/msg/Odometry has a covariance field. There is no motive to take +# the version without covariance from Gazebo +#- ros_topic_name: "/ground_truth" +# gz_topic_name: "/model/twil/odometry" +# ros_type_name: "nav_msgs/msg/Odometry" +# gz_type_name: "gz.msgs.Odometry" +# direction: GZ_TO_ROS + +- ros_topic_name: "/ground_truth" + gz_topic_name: "/model/twil/odometry_with_covariance" + ros_type_name: "nav_msgs/msg/Odometry" + gz_type_name: "gz.msgs.OdometryWithCovariance" + direction: GZ_TO_ROS + +- ros_topic_name: "/pose" + gz_topic_name: "/model/twil/pose" + ros_type_name: "geometry_msgs/msg/PoseArray" + gz_type_name: "gz.msgs.Pose_V" + direction: GZ_TO_ROS + +- ros_topic_name: "/gnss/fix" + gz_topic_name: "/gnss/fix" + ros_type_name: "sensor_msgs/msg/NavSatFix" + gz_type_name: "gz.msgs.NavSat" + direction: GZ_TO_ROS + +- ros_topic_name: "/imu/data" + gz_topic_name: "/imu/data" + ros_type_name: "sensor_msgs/msg/Imu" + gz_type_name: "gz.msgs.IMU" + direction: GZ_TO_ROS + +- ros_topic_name: "/imu/mag" + gz_topic_name: "/imu/mag" + ros_type_name: "sensor_msgs/msg/MagneticField" + gz_type_name: "gz.msgs.Magnetometer" + direction: GZ_TO_ROS + +- ros_topic_name: "/depth_camera/camera_info" + gz_topic_name: "/depth_camera/camera_info" + ros_type_name: "sensor_msgs/msg/CameraInfo" + gz_type_name: "gz.msgs.CameraInfo" + direction: GZ_TO_ROS + +- ros_topic_name: "/depth_camera/image_raw" + gz_topic_name: "/depth_camera/image_raw" + ros_type_name: "sensor_msgs/msg/Image" + gz_type_name: "gz.msgs.Image" + direction: GZ_TO_ROS + \ No newline at end of file diff --git a/twil_description/launch/gazebo.launch.xml b/twil_description/launch/gazebo.launch.xml index 1f53b26..f29b4f4 100644 --- a/twil_description/launch/gazebo.launch.xml +++ b/twil_description/launch/gazebo.launch.xml @@ -1,7 +1,7 @@ - + - + + - - - + + + + + + + + - - @@ -41,7 +45,13 @@ + - + + + + + + diff --git a/twil_description/launch/twil.launch.xml b/twil_description/launch/twil.launch.xml index 8b56e4b..ce406a7 100644 --- a/twil_description/launch/twil.launch.xml +++ b/twil_description/launch/twil.launch.xml @@ -1,6 +1,6 @@ 0.0 - 2e-4 + 1.5e-5 0.0 - 2e-4 + 1.5 - - - - - - ${name}_controller/out:=${name}/fix - - ${name}_link - + + + + 0.0 + 0.0514444 + + + + + 0.0 + 0.0514444 + + + + - Gazebo/Grey + Gazebo/Black + + + + diff --git a/twil_description/xacro/ground_truth.urdf.xacro b/twil_description/xacro/ground_truth.urdf.xacro new file mode 100644 index 0000000..1a404d4 --- /dev/null +++ b/twil_description/xacro/ground_truth.urdf.xacro @@ -0,0 +1,15 @@ + + + + + + + 3 + map + 0.0 0.0 0.0 + 0.0 0.0 0.0 + 0.0 + twil_origin + + + diff --git a/twil_description/xacro/gz_ros2_control.urdf.xacro b/twil_description/xacro/gz_ros2_control.urdf.xacro new file mode 100644 index 0000000..725b8dc --- /dev/null +++ b/twil_description/xacro/gz_ros2_control.urdf.xacro @@ -0,0 +1,9 @@ + + + + + + $(find twil_description)/config/controller_manager.yaml + + + diff --git a/twil_description/xacro/ros2_control.urdf.xacro b/twil_description/xacro/ros2_control.urdf.xacro new file mode 100644 index 0000000..9014bd3 --- /dev/null +++ b/twil_description/xacro/ros2_control.urdf.xacro @@ -0,0 +1,29 @@ + + + + + + gz_ros2_control/GazeboSimSystem + + + + + -100 + 100 + + + + + + + + + -100 + 100 + + + + + + + diff --git a/twil_description/xacro/sonar.urdf.xacro b/twil_description/xacro/sonar.urdf.xacro index 10c47ae..026b3e9 100644 --- a/twil_description/xacro/sonar.urdf.xacro +++ b/twil_description/xacro/sonar.urdf.xacro @@ -2,7 +2,6 @@ - diff --git a/twil_description/xacro/step_motor.urdf.xacro b/twil_description/xacro/step_motor.urdf.xacro index e4f1324..a0a8f9f 100644 --- a/twil_description/xacro/step_motor.urdf.xacro +++ b/twil_description/xacro/step_motor.urdf.xacro @@ -2,8 +2,6 @@ - - diff --git a/twil_description/xacro/tower.urdf.xacro b/twil_description/xacro/tower.urdf.xacro index d5c16f7..ecdbaa9 100644 --- a/twil_description/xacro/tower.urdf.xacro +++ b/twil_description/xacro/tower.urdf.xacro @@ -2,8 +2,6 @@ - - @@ -35,7 +33,7 @@ - + diff --git a/twil_description/xacro/twil.urdf.xacro b/twil_description/xacro/twil.urdf.xacro index 8107882..2f25bbc 100644 --- a/twil_description/xacro/twil.urdf.xacro +++ b/twil_description/xacro/twil.urdf.xacro @@ -1,35 +1,36 @@ + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - + @@ -81,11 +82,11 @@ - + @@ -105,7 +106,7 @@ - + @@ -113,72 +114,45 @@ - + - + - - + + - - - gazebo_ros2_control/GazeboSystem - - - - - -100 - 100 - - - - - + - - - -100 - 100 - - - - - - + + + - - - robot_description - robot_state_publisher - $(find twil_description)/config/controller_manager.yaml - - - - map - twil_origin - - odom:=ground_truth - - - - - - - - + + + - - + + + + + + + + +