Git Product home page Git Product logo

ros_cpp's Introduction

ROS_CPP

Basics of using C++ with ROS. The files that are in this repository are created during my learning phase of coding ROS based executables with C++. The programming tasks are provided by the free course offered by ROBOT IGNITE ACADEMY.

Course Contents:

  • name.cpp c++ code that prints "Hello World" to the console.
  • unit1.cpp c++ code that makes the robot to move and prints the position of the robot in Gazebo
  • unit1_exercise.cpp ros c++ code that takes the robot positions at two separate timestamps and calculates the velocity in gazebo at two instants.
  • unit2_exercise.cpp code that retrieves full cartesian pose of the robot as list from odom and prints the position of the robot
  • unit3_exercise.cpp separate function that makes the robot to move with series of velocity commands and returns the cartesian pose of the robot available through the odom topic
  • unit4_exercise.cpp ros node that receives all the laser readings at that timestamp and print it to the console with pointer to the first element of the laser readings
  • unit5_exercise.cpp separate class that inherits from rosbot_control and moves the robot
  • unit6_exercise.cpp mini project of the course

Execution

The above cpp files will provide a ros executable node. But for the node to perform the function mentioned in the code the simulation of the robot has to be launched.To launch the simulation, run the following command in the terminal,

roslaunch rosbot_launch rosbot_launch.launch

On executing the above command in the terminal the following window opens. Gazebo environment with the robot and its simulation world.

gazebo_world

The available topics from the robot can be seen in the terminal with the following command,

rostopic list

rostopic

To execute any of the above mentioned "__exercise.cpp", make sure that the simulation is running and to execute the node provided by the "__exercise.cpp", run the following command in the terminal.

rosrun c_scripts unit3_exercise

Robot movement

ros_cpp's People

Contributors

irudhaya avatar

Watchers

 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.