From 54dbf0a7aa6bd3c74ae102b58c32f334ada952b3 Mon Sep 17 00:00:00 2001 From: SimonR99 Date: Thu, 14 Mar 2024 19:11:50 -0400 Subject: [PATCH] fix teleop path --- .../rove_controller_bluethoot.launch.py | 2 +- .../launch/rove_controller_usb.launch.py | 2 +- src/rove_description/config/robot_bridge.yaml | 16 --- src/rove_description/launch/sim.launch.py | 8 ++ src/rove_description/urdf/command.urdf.xacro | 101 ++++++++++++++++++ src/rove_description/urdf/flipper.urdf.xacro | 6 +- src/rove_description/urdf/gazebo.urdf.xacro | 18 ++-- src/rove_description/urdf/rove.urdf.xacro | 2 +- src/rove_description/urdf/track.urdf.xacro | 4 +- src/rove_slam/config/ekf.yaml | 2 +- 10 files changed, 127 insertions(+), 34 deletions(-) delete mode 100644 src/rove_description/config/robot_bridge.yaml create mode 100644 src/rove_description/urdf/command.urdf.xacro diff --git a/src/rove_bringup/launch/rove_controller_bluethoot.launch.py b/src/rove_bringup/launch/rove_controller_bluethoot.launch.py index a52ec66..efec645 100644 --- a/src/rove_bringup/launch/rove_controller_bluethoot.launch.py +++ b/src/rove_bringup/launch/rove_controller_bluethoot.launch.py @@ -24,7 +24,7 @@ def generate_launch_description(): name='teleop_twist_joy_node', parameters=[teleope_joy_params_file], remappings=[ - ('/joy', '/rove/joy'), + ('/joy', '/joy'), # ('/cmd_vel', '/model/rove/cmd_vel') ], ), diff --git a/src/rove_bringup/launch/rove_controller_usb.launch.py b/src/rove_bringup/launch/rove_controller_usb.launch.py index 82ea85a..846e720 100644 --- a/src/rove_bringup/launch/rove_controller_usb.launch.py +++ b/src/rove_bringup/launch/rove_controller_usb.launch.py @@ -24,7 +24,7 @@ def generate_launch_description(): name='teleop_twist_joy_node', parameters=[teleope_joy_params_file], remappings=[ - ('/joy', '/rove/joy'), + ('/joy', '/joy'), # ('/cmd_vel', '/model/rove/cmd_vel') ], ), diff --git a/src/rove_description/config/robot_bridge.yaml b/src/rove_description/config/robot_bridge.yaml deleted file mode 100644 index 040dd4b..0000000 --- a/src/rove_description/config/robot_bridge.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- ros_topic_name: "/rove/cmd_vel" - gz_topic_name: "/model/rove/cmd_vel" - ros_type_name: "geometry_msgs/msg/Twist" - gz_type_name: "gz.msgs.Twist" - direction: ROS_TO_GZ -- ros_topic_name: "/rove/odom" - gz_topic_name: "/model/rove/odometry" - ros_type_name: "nav_msgs/msg/Odometry" - gz_type_name: "gz.msgs.Odometry" - direction: GZ_TO_ROS -- ros_topic_name: "/rove/scan" - gz_topic_name: "/model/rove/lidar" - ros_type_name: "sensor_msgs/msg/LaserScan" - gz_type_name: "ignition.msgs.LaserScan" - direction: GZ_TO_ROS \ No newline at end of file diff --git a/src/rove_description/launch/sim.launch.py b/src/rove_description/launch/sim.launch.py index 01516fa..64bb242 100644 --- a/src/rove_description/launch/sim.launch.py +++ b/src/rove_description/launch/sim.launch.py @@ -20,6 +20,7 @@ def generate_launch_description(): pkg_rove_nav = get_package_share_directory('rove_navigation') slam_pkg_path = get_package_share_directory("slam_toolbox") pkg_ros_gz_sim = get_package_share_directory('ros_gz_sim') + bringup_pkg_path = get_package_share_directory('rove_bringup') # Get the URDF file urdf_path = os.path.join(pkg_rove_description, 'urdf', 'rove.urdf.xacro') @@ -108,6 +109,12 @@ def generate_launch_description(): {'use_sim_time': True}] ) + teleop = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(bringup_pkg_path, "launch", "rove_controller_usb.launch.py"), + ), + ) + return LaunchDescription([ gz_sim, DeclareLaunchArgument('rviz', default_value='true', @@ -119,4 +126,5 @@ def generate_launch_description(): slam, create, nav, + teleop, ]) diff --git a/src/rove_description/urdf/command.urdf.xacro b/src/rove_description/urdf/command.urdf.xacro new file mode 100644 index 0000000..c265b82 --- /dev/null +++ b/src/rove_description/urdf/command.urdf.xacro @@ -0,0 +1,101 @@ + + + + + 87 + + + linear: {x: 1.0}, angular: {z: 0.0} + + + + + + + 88 + + + linear: {x: -1.0}, angular: {z: 0.0} + + + + + + + 83 + + + linear: {x: 0.0}, angular: {z: 0.0} + + + + + + + 65 + + + linear: {x: 0.0}, angular: {z: 1.0} + + + + + + + 68 + + + linear: {x: 0.0}, angular: {z: -1.0} + + + + + + + 81 + + + linear: {x: 1.0}, angular: {z: 1.0} + + + + + + + 69 + + + linear: {x: 1.0}, angular: {z: -1.0} + + + + + + + 90 + + + linear: {x: -1.0}, angular: {z: 1.0} + + + + + + + 67 + + + linear: {x: -1.0}, angular: {z: -1.0} + + + + \ No newline at end of file diff --git a/src/rove_description/urdf/flipper.urdf.xacro b/src/rove_description/urdf/flipper.urdf.xacro index 9033fd6..4f4520a 100644 --- a/src/rove_description/urdf/flipper.urdf.xacro +++ b/src/rove_description/urdf/flipper.urdf.xacro @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + 0.65 0.85 @@ -75,7 +75,7 @@ - + flipper_${suffix} -3.0 3.0 diff --git a/src/rove_description/urdf/gazebo.urdf.xacro b/src/rove_description/urdf/gazebo.urdf.xacro index 710495f..f79f405 100644 --- a/src/rove_description/urdf/gazebo.urdf.xacro +++ b/src/rove_description/urdf/gazebo.urdf.xacro @@ -3,14 +3,14 @@ + filename="gz-sim-joint-state-publisher-system" + name="gz::sim::systems::JointStatePublisher"> joint_states + filename="gz-sim-imu-system" + name="gz::sim::systems::Imu"> @@ -22,12 +22,12 @@ flipper_fr flipper_rr - + 0.63 0.18094 1 - cmd_vel + cmd_vel odom odom @@ -35,14 +35,14 @@ 30 false - true + false /tf + filename="gz-sim-sensors-system" + name="gz::sim::systems::Sensors"> ogre2 diff --git a/src/rove_description/urdf/rove.urdf.xacro b/src/rove_description/urdf/rove.urdf.xacro index 246d5e2..ed461d0 100644 --- a/src/rove_description/urdf/rove.urdf.xacro +++ b/src/rove_description/urdf/rove.urdf.xacro @@ -13,7 +13,7 @@ - + diff --git a/src/rove_description/urdf/track.urdf.xacro b/src/rove_description/urdf/track.urdf.xacro index 9d0a564..bb8c100 100644 --- a/src/rove_description/urdf/track.urdf.xacro +++ b/src/rove_description/urdf/track.urdf.xacro @@ -55,8 +55,8 @@ track_${suffix} - -1.0 - 1.0 + -3.0 + 3.0 diff --git a/src/rove_slam/config/ekf.yaml b/src/rove_slam/config/ekf.yaml index 9805e19..1f406cf 100644 --- a/src/rove_slam/config/ekf.yaml +++ b/src/rove_slam/config/ekf.yaml @@ -13,7 +13,7 @@ ekf_filter_node: odom0: /odom odom0_config: [true, true, true, - false, false, false, + false, false, true, false, false, false, false, false, true, false, false, false]