Ask Your Question

ericnasanta's profile - activity

2022-04-01 16:32:14 -0500 received badge  Notable Question (source)
2022-03-24 21:06:57 -0500 received badge  Famous Question (source)
2022-03-21 09:33:41 -0500 received badge  Popular Question (source)
2022-03-18 15:16:13 -0500 asked a question Smac 2D Planner vs NavFn Planner

Smac 2D Planner vs NavFn Planner After reading the documentation for both, I'm not sure I quite grasp the differences an

2022-01-24 00:16:47 -0500 received badge  Notable Question (source)
2021-11-22 10:03:43 -0500 commented answer [slam_toolbox]: Message Filter dropping message: for reason 'discarding message because the queue is full'

Thanks for the help!

2021-11-18 09:48:56 -0500 commented answer Setting up odometry on physical bot

Thanks! I'll look into it!

2021-11-18 09:48:13 -0500 marked best answer Setting up odometry on physical bot

Howdy!

I'm currently making the switch from gazebo to a physical bot and realized I was using gazebo's diff drive plugin to handle publishing odom transformations.

I'm wondering how can I create a odom -> base_link transformation using ROS2 galactic for real life application. If anyone knows any examples, it would be greatly appreciated!

2021-11-18 02:37:49 -0500 received badge  Popular Question (source)
2021-11-17 10:36:31 -0500 asked a question Setting up odometry on physical bot

Setting up odometry on physical bot Howdy! I'm currently making the switch from gazebo to a physical bot and realized I

2021-11-17 09:51:08 -0500 commented answer [slam_toolbox]: Message Filter dropping message: for reason 'discarding message because the queue is full'

Howdy! I'm having the same problem. I know I have to create a odom -> base link transform, but I'm not sure how. I ju

2021-10-28 12:36:37 -0500 received badge  Notable Question (source)
2021-10-22 12:18:18 -0500 marked best answer Remapping diff drive controller to cmd_vel

Hi!

I'm looking to use nav2 with my current diff drive controller setup. My controller is currently subscribed to the /diff_drive_controller/cmd_vel_unstamped topic, while it appears nav is publishing to the /cmd_vel topic. Is there a way I can remap my current controller to subscribe to the /cmd_vel topic.

I'm currently working with ros2 foxy on Ubuntu 20.04 in Gazebo.

Here's how i'm loading my controllers in my launch file:

robot_state_publisher_node = launch_ros.actions.Node(
    package='robot_state_publisher',
    executable='robot_state_publisher',

    parameters=[{'use_sim_time': LaunchConfiguration('use_sim_time')},{'robot_description': Command(['xacro ', LaunchConfiguration('model')])}]
)

rviz_node = launch_ros.actions.Node(
    package='rviz2',
    executable='rviz2',
    name='rviz2',
    output='screen',
    parameters=[{'use_sim_time': LaunchConfiguration('use_sim_time')}],
    arguments=['-d', LaunchConfiguration('rvizconfig'),{ 'robot_description': Command(['xacro ', LaunchConfiguration('model')])}],
)
spawn_entity = launch_ros.actions.Node(
    package='gazebo_ros',
    executable='spawn_entity.py',
    arguments=['-entity', 'robotech', '-topic', { 'robot_description': Command(['xacro ', LaunchConfiguration('model')])}],
    output='screen',

)

robot_localization_node = launch_ros.actions.Node(
  package='robot_localization',
   executable='ekf_node',
   name='ekf_filter_node',
   output='screen',
   parameters=[os.path.join(pkg_share, 'config/ekf.yaml'), {'use_sim_time': LaunchConfiguration('use_sim_time')},{ 'robot_description': Command(['xacro ', LaunchConfiguration('model')])}]
)

load_joint_state_controller = ExecuteProcess(
    cmd=['ros2', 'control', 'load_controller', '--set-state','start',
         'joint_state_broadcaster'],
    output='screen'
)

load_joint_trajectory_controller = ExecuteProcess(
    cmd=['ros2', 'control', 'load_controller', '--set-state','start', 'joint_trajectory_controller'],
    output='screen'
)

load_diff_drive_controller = ExecuteProcess(
    cmd=['ros2', 'control', 'load_controller', '--set-state','start', 'diff_drive_controller'],
    output='screen'
)

return launch.LaunchDescription([

    launch.actions.DeclareLaunchArgument(name='gui', default_value='False',
                                        description='Flag to enable joint_state_publisher_gui'),
    launch.actions.DeclareLaunchArgument(name='model', default_value=default_model_path,
                                        description='Absolute path to robot urdf file'),

    launch.actions.DeclareLaunchArgument(name='rvizconfig', default_value=default_rviz_config_path,
                                        description='Absolute path to rviz config file'),
    launch.actions.ExecuteProcess(cmd=['gazebo','--verbose', '-s', 'libgazebo_ros_init.so', '-s', 'libgazebo_ros_factory.so', world_path], output='screen'),

    launch.actions.DeclareLaunchArgument(name='use_sim_time', default_value='True',
                                        description='Flag to enable use_sim_time'),

    RegisterEventHandler(
        event_handler=OnProcessExit(
            target_action=spawn_entity,
            on_exit=[load_joint_state_controller],
        )
    ),
    RegisterEventHandler(
        event_handler=OnProcessExit(
            target_action=load_joint_state_controller,
            on_exit=[load_joint_trajectory_controller],
        )
    ),
    RegisterEventHandler(
        event_handler=OnProcessExit(
            target_action=load_joint_state_controller,
            on_exit=[load_diff_drive_controller],
        )
    ),
    robot_state_publisher_node,
    spawn_entity,
    robot_localization_node,
    rviz_node
])

Edit: and this is my config file.

controller_manager:
  ros__parameters:
    update_rate: 100  # Hz
    use_sim_time: True
    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster



    joint_trajectory_controller:
      type: joint_trajectory_controller/JointTrajectoryController

    diff_drive_controller:
      type: diff_drive_controller/DiffDriveController

diff_drive_controller:
  ros__parameters:

    use_sim_time: True
    left_wheel_names: ["drivewhl_l_joint"]
    right_wheel_names: ["drivewhl_r_joint"]


    wheel_separation: 0.406
    #wheels_per_side: 1  # actually 2, but both are controlled by 1 signal
    wheel_radius: 0.0865

    wheel_separation_multiplier: 1.0
    left_wheel_radius_multiplier: 1.0
    right_wheel_radius_multiplier: 1.0

    publish_rate: 50.0
    odom_frame_id: odom
    base_frame_id: base_link
    pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01]
    twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01]

    open_loop: true
    enable_odom_tf: false



    cmd_vel_timeout: 0.5
    #publish_limited_velocity: true
    use_stamped_vel: false
    #velocity_rolling_window_size: 10

    # Preserve turning radius when limiting speed/acceleration/jerk
    preserve_turning_radius: false

    # Publish limited velocity
    publish_cmd: false

    # Publish wheel data
    publish_wheel_data: false

    # Velocity and acceleration limits
    # Whenever a min_* is unspecified, default to -max_*

    linear.x.max_velocity: 100.0
    linear.x.min_velocity: -100.0
    linear.x.max_acceleration: 5.0


    angular.z.max_velocity: 100.0
    angular.z.min_velocity: -100.0
    angular.z.max_acceleration: 5.0



joint_trajectory_controller:
  ros__parameters:
    use_sim_time: True
    joints:
      - frcasterbase
      - frcasterwheel
      - rrcasterbase
      - rrcasterwheel
      - rlcasterbase
      - rlcasterwheel
      - flcasterbase
      - flcasterwheel
      - drivewhl_l_joint
      - drivewhl_r_joint


    interface_name: position

    command_interfaces:
      - position

    state_interfaces:
      - position
      - velocity
2021-10-22 12:18:18 -0500 received badge  Scholar (source)
2021-10-21 14:44:31 -0500 received badge  Editor (source)
2021-10-21 14:44:31 -0500 edited question Remapping diff drive controller to cmd_vel

Remapping diff drive controller to cmd_vel Hi! I'm looking to use nav2 with my current diff drive controller setup. My

2021-10-21 12:39:38 -0500 received badge  Enthusiast
2021-10-20 11:22:46 -0500 received badge  Popular Question (source)
2021-10-19 15:21:15 -0500 edited question Remapping diff drive controller to cmd_vel

Remapping diff drive controller to cmd_vel Hi! I'm looking to use nav2 with my current diff drive controller setup. My

2021-10-18 16:14:36 -0500 asked a question Remapping diff drive controller to cmd_vel

Remapping diff drive controller to cmd_vel Hi! I'm looking to use nav2 with my current diff drive controller setup. My

2021-10-18 11:35:36 -0500 received badge  Supporter (source)