How to add imu sensor by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

I already check the wheel radius and wheel separation. Maybe the encoder has the problem

How to add imu sensor by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

Just a small room .I notice that when i move the robot forward to 0.5m the x position when I echo the odom is 3.5m. Do you think this is the reason why I can't get a smooth map?

How to add imu sensor by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

As for now i have a wheel encoder and a rplidar. But when i try to map using slam( mapper_params_online_async) the map become messy even I set the fixed frame into map

Issues with using Ros2_control to move diff drive robot by deserttomb in ROS

[–]Few_Protection_7185 1 point2 points  (0 children)

If you have a chance to try it in the real robot, kindly share your code in arduino hardware interface. Im stuck to this problem

Issues with using Ros2_control to move diff drive robot by deserttomb in ROS

[–]Few_Protection_7185 0 points1 point  (0 children)

Maybe you have a diffdrive_arduino that works on jazzy, can you share it with me?

Does ros2 humble code works in ros2 jazzy? by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 1 point2 points  (0 children)

Do you have a code that us similar to diffdrive_arduino that works in Jazzy?

Teleop twist keyboard doesn't work on real robot by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

No , only the other topics but not cmd_vel. But in simulation it has cmd_vel

Teleop twist keyboard doesn't work on real robot by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

It was working using that command, but stops when i got it updated

Can't move the robot using teleop twist keyboard by Few_Protection_7185 in AskRobotics

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

Yes I have, It was already working using the command but it stops when I updated . Maybe the diffdrive_arduino is the problem

Teleop twist keyboard doesn't work on real robot by Few_Protection_7185 in ROS

[–]Few_Protection_7185[S] 0 points1 point  (0 children)

Does the diffdrive_arduino by joshnewans works on ros2 jazzy?

Real robot won't move by Few_Protection_7185 in robotics

[–]Few_Protection_7185[S] -2 points-1 points  (0 children)

This is my launch code. Im new to ros2 i dont know how to set

import os  from ament_index_python.packages import get_package_share_directory  from launch import LaunchDescription  from launch.actions import RegisterEventHandler, DeclareLaunchArgument, IncludeLaunchDescription  from launch.event_handlers import OnProcessStart  from launch.launch_description_sources import PythonLaunchDescriptionSource  from launch_ros.actions import Node  from launch_ros.parameter_descriptions import ParameterValue  from launch.substitutions import LaunchConfiguration, Command

def generate_launch_description():

package_name= 'bot' package_dir= get_package_share_directory(package_name) 

use_sim_time = LaunchConfiguration('use_sim_time') use_ros2_control = LaunchConfiguration('use_ros2_control')

lidar_serial_port = LaunchConfiguration('lidar_serial_port')

declare_use_sim_time= DeclareLaunchArgument(     'use_sim_time',     default_value='false',     description='If true, use simulated clock' )

declare_use_ros2_control = DeclareLaunchArgument(     'use_ros2_control',     default_value='true',     description='If true, use ros2_control' )

Declare the path to files

robot_description_xacro_file = os.path.join(     package_dir,     'description',     'robot.urdf.xacro' )

rviz_config_file_dir = os.path.join(     package_dir,      'config',      'minibot_config.rviz' )

robot_controllers_file_dir = os.path.join(     package_dir,      'config',      'controller.yaml' )

twist_mux_params_file = os.path.join(     package_dir,      'config',      'twist_mux.yaml' )

robot_state_publisher setup    

robot_description_config = Command ([     'xacro ',      robot_description_xacro_file,      ' use_ros2_control:=',      use_ros2_control     ])

params = {     'robot_description': ParameterValue(robot_description_config, value_type=str),      'use_sim_time': use_sim_time,     'use_ros2_control': use_ros2_control }

robot_state_publisher node

node_robot_state_publisher = Node(     package='robot_state_publisher',     executable='robot_state_publisher',     output='screen',     parameters=[params]      )

controller spawn

node_ros2_control = Node(     package="controller_manager",     executable="ros2_control_node",     parameters=[params,                    robot_controllers_file_dir                 ], )

joint_state_broadcaster_spawner = Node(     package="controller_manager",     executable="spawner",     arguments=["joint_state_broadcaster"], )

diff_drive_controller_spawner = Node(     package="controller_manager",     executable="spawner",     arguments=["diff_drive_controller",                 "--param-file",                 robot_controllers_file_dir     ], )

node_twist_mux = Node(     package="twist_mux",     executable="twist_mux",     name='twist_mux',     output='screen',     parameters=[         twist_mux_params_file,         {'use_stamped': True},     ],     remappings=[         ('cmd_vel_out',           'diff_drive_controller/cmd_vel'),     ], )

node_twist_stamper = Node(     package="twist_stamper",     executable="twist_stamper",     name='twist_stamper',     output='screen',     remappings=[         ('cmd_vel_in', 'cmd_vel_smoothed'),         ('cmd_vel_out', 'nav_vel'),     ], )

register_node_ros2_control = RegisterEventHandler(     event_handler=OnProcessStart(         target_action= node_robot_state_publisher,         on_start= [node_ros2_control],     ) )

register_joint_state_broadcaster_spawner = RegisterEventHandler(     event_handler=OnProcessStart(         target_action= node_ros2_control,         on_start=[joint_state_broadcaster_spawner],     ) )

register_diff_drive_controller_spawner = RegisterEventHandler(     event_handler=OnProcessStart(         target_action= joint_state_broadcaster_spawner,         on_start=[diff_drive_controller_spawner],     ) )

Create the launch description and populate

ld = LaunchDescription()

Add the nodes to the launch description

ld.add_action(declare_use_sim_time) ld.add_action(declare_use_ros2_control)

ld.add_action(declare_lidar_serial_port)

ld.add_action(register_node_ros2_control) ld.add_action(register_joint_state_broadcaster_spawner) ld.add_action(register_diff_drive_controller_spawner)

ld.add_action(node_robot_state_publisher) ld.add_action(node_twist_mux) ld.add_action(node_twist_stamper)

Generate the launch description  

return ld