Skip to content

This repo is created for tracking our 6th-sem-minor-project titled "Self Driving Car: Mapping, Path Planning and Navigation" using ROS2 Framework.

Notifications You must be signed in to change notification settings

aarjan222/minor_ros

Repository files navigation

car_gazebo

Car like robot is simulated in real life using ros2_control. This package contains urdf file for the car like robot.

Installation

pip3 uninstall serial
pip3 install pyserial==3.5

sudo apt install ros-humble-xacro
sudo apt install ros-humble-joint-state-publisher-gui 
rosdep install --from-paths src --ignore-src -r -y

colcon build
source install/setup.bash

Launch File for viewing car only

ros2 launch car_gazebo view_car.launch.py

set base_footprint as fixed_frame in rviz2

Launch File for running the hardware real carlikerobot

ros2 launch car_gazebo bringup_car.launch.py remap_odometry_tf:=true

set odom as fixed_frame in rviz2

In another terminal run for sending feedback of stm to ros2_control using socket

ros2 run car_gazebo pose_receiver.py

Check if the hardware interface loaded properly, by opening another terminal and executing

ros2 control list_hardware_interfaces

You should get

command interfaces
   bicycle_steering_controller/angular/position [unavailable] [unclaimed]
   bicycle_steering_controller/linear/velocity [unavailable] [unclaimed]
   virtual_front_wheel_joint/position [available] [claimed]
   virtual_rear_wheel_joint/velocity [available] [claimed]
state interfaces
   virtual_front_wheel_joint/position
   virtual_rear_wheel_joint/position
   virtual_rear_wheel_joint/velocity

Check if controllers are running

ros2 control list_controllers

You should get

joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active
bicycle_steering_controller[bicycle_steering_controller/BicycleSteeringController] active

If everything is fine, now you can send a command to bicycle_steering_controller using ROS 2 CLI:

ros2 topic pub --rate 30 /bicycle_steering_controller/reference geometry_msgs/msg/TwistStamped "
  twist:
    linear:
      x: 1.0
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: 0.1"

You can also run your car using teleop_twist_keyboard also

ros2 run teleop_twist_keyboard teleop_twist_keyboard

About

This repo is created for tracking our 6th-sem-minor-project titled "Self Driving Car: Mapping, Path Planning and Navigation" using ROS2 Framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages