Hi,
i found two ways to setup a controller to drive around with my mobile platform robot and am a bit confused.
First I found the way to create a new xacro file and will it with a gazebo-tag and options for the controller:100.0 / joint_base_wheel_front_left joint_base_wheel_front_right joint_base_wheel_rear_left joint_base_wheel_rear_right ${2*0.77} ${2*wheel_radius} heros_base_link 130 cmd_vel odom odom 1
Whats this file libgazebo_ros_skid_steer_drive.so?
The second way is to load a controller in my gazebo launch file like that:
Then I had this .yaml file for all the settings:
robot_joint_publisher:
type: "joint_state_controller/JointStateController"
publish_rate: 50
robot_velocity_controller:
type: "diff_drive_controller/DiffDriveController"
left_wheel: ['joint_base_wheel_front_left', 'joint_base_wheel_rear_left']
right_wheel: ['joint_base_wheel_front_right', 'joint_base_wheel_front_right']
publish_rate: 100
pose_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.03]
twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.03]
cmd_vel_timeout: 0.25
# Base frame_id
base_frame_id: robot_base_link
# Odometry fused with IMU is published by robot_localization, so
# no need to publish a TF based on encoders alone.
enable_odom_tf: false
# Wheel separation and radius multipliers
wheel_separation_multiplier: 0.580
wheel_radius_multiplier : 0.32
# Velocity and acceleration limits
linear:
x:
has_velocity_limits : true
max_velocity : 0.9 # m/s
has_acceleration_limits: true
max_acceleration : 3.0 # m/s^2
angular:
z:
has_velocity_limits : true
max_velocity : 2.0 # rad/s
has_acceleration_limits: true
max_acceleration : 6.0 # rad/s^2
In option 1 I added the topic to publish the odometry and so on. In the second way i didnt. Where does ROS know how to publish those things?
To use all of this I have to add a transmission tag to my wheels like that. Is that right?
transmission_interface/SimpleTransmission hardware_interface/VelocityJointInterface 100
Are this two described ways the same thing or does it make any difference to do it like one of this ways? Are these ways common to setup the control setting for a robot or did i do incorrect things?
Thanks for your help
Max
↧