Coder Social home page Coder Social logo

ros_follow_line's Introduction

ROS Seminar

Index

Overview

Programming a Formula 1 on a race track by following a red line in the center of the road with an RGB camera integrated into the F1 model.

First Steps

Clone the repository

mkdir -p $HOME/seminar_ws/src
cd $HOME/seminar_ws/src && git clone https://github.com/pariaspe/ros_follow_line.git

Building

cd ~/seminar_ws && catkin build

Setting up the environment

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$HOME/seminar_ws/src/ros_follow_line/models
export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:$HOME/seminar_ws/src/ros_follow_line/worlds

Launching

source $HOME/seminar_ws/src/devel/setup.bash
roslaunch ros_follow_line simple_circuit.launch

Try it!

rostopic pub /F1ROS/cmd_vel geometry_msgs/Twist "linear:
  x: 0.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: 0.2"
rosrun rqt_image_view rqt_image_view

ROS Interfaces

Topics

Topic name ROS msg Description
/F1ROS/camera/image_raw sensor_msgs/msg/Image F1 image publisher
/F1ROS/camera/camera_info sensor_msgs/msg/CameraInfo F1 camera info publisher
/F1ROS/odom nav_msgs/msg/Odometry F1 odometry publisher
/F1ROS/cmd_vel geometry_msgs/msg/Twist F1 commander publisher

Services

Service name ROS msg Description
/game_logic/start std_srvs/srv/Trigger Start Game Logic
/game_logic/stop std_srvs/srv/Trigger Stop Game Logic

Troubleshooting

$  gazebo worlds/simple_circuit.world
[INFO] [1675081776.219252956] [gazebo_ros_node]: ROS was initialized without arguments.
[INFO] [1675081776.342421523] [object_controller]: Subscribed to [/cmd_vel]
[INFO] [1675081776.348074673] [object_controller]: Advertise odometry on [/odom]
[INFO] [1675081776.350898997] [object_controller]: Publishing odom transforms between [odom] and [base_footprint]
gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed.
[INFO] [1675081778.089864820] [rclcpp]: signal_handler(signum=2)

Fix:

 . /usr/share/gazebo/setup.sh 

Acknowledgements

The idea of the exercise, the models and the worlds files are original from RoboticsAcademy (JdeRobot), where the author is an active maintainer.

License

The source code is released under GPLv3 license.

ros_follow_line's People

Contributors

pariaspe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.