Git Product home page Git Product logo

Comments (9)

routiful avatar routiful commented on May 20, 2024 1

Hello :)

Delete build and devel folder in catkin_ws and try once again catkin_make command.

from turtlebot3.

oceanjules avatar oceanjules commented on May 20, 2024 1

@francoiswindels
So your error log is actually quite explanatory - it tells you:
"error: ‘robot_model’ was not declared in this scope"

That cpp file is written in a way, so that it works on both Burger and Waffle without duplicating code. When you run it, it looks for a variable robot_model and from then onwards, it knows whether you want to be working with Burger or Waffle. So all you need to do is initialize it. If you keep working with different models, you can initialize it in the terminal every time you decide to do some coding (and then when you close the terminal, your variable will disappear). Or (and that is what most people do, because who has money and time for both versions 😋), you just add an extra line to .bashrc file. It is actually described in the official manual here: http://emanual.robotis.com/docs/en/platform/turtlebot3/bringup/

Just go
gedit ~/.bashrc
add line export TURTLEBOT3_MODEL = ... (whatever you have)
source ~/.bashrc

from turtlebot3.

francoiswindels avatar francoiswindels commented on May 20, 2024 1

from turtlebot3.

routiful avatar routiful commented on May 20, 2024

Hello @francoiswindels :)

Did you try download turtlebot3_msgs??

from turtlebot3.

francoiswindels avatar francoiswindels commented on May 20, 2024

from turtlebot3.

francoiswindels avatar francoiswindels commented on May 20, 2024

Hi,
thanks for following up,
i tried a build after deleting build and devel but that did not help
the problem seems to be coming from gazebo_ros_turtlebot3.cpp
any thought?

thanks
F

error_log.docx

from turtlebot3.

francoiswindels avatar francoiswindels commented on May 20, 2024

from turtlebot3.

oceanjules avatar oceanjules commented on May 20, 2024

Okay, but if you look at your log, all errors start at line 45
If I am not mistaken, this is where it crashes:

bool GazeboRosTurtleBot3::init()
{
  // initialize ROS parameter
  nh_.param("is_debug", is_debug_, is_debug_);
  std::string robot_model = nh_.param<std::string>("tb3_model", "");

  if (!robot_model.compare("burger"))
  {
    turning_radius_ = 0.08;
    rotate_angle_ = 50.0 * DEG2RAD;
    front_distance_limit_ = 0.7;
    side_distance_limit_  = 0.4;
  }

So just 2 lines above robot_model.compare("burger") we have both declaration and initialization of the variable robot_model. You could put a print statement after it to see whether nh_.param<std::string>("tb3_model", "") was actually able to find it out.

Then your log says "turning_radius_’, ‘rotate_angle_’ , ‘front_distance_limit_’ , ‘side_distance_limit_’ was not declared in this scope". What you are doing inside "if" is initializing, but those variable should have been declared in a header file (gazebo_ros_turtlebot3.h which is inside "include" folder)

from turtlebot3.

francoiswindels avatar francoiswindels commented on May 20, 2024

Hi,
i tried just that and it all worked.
thanks
F

from turtlebot3.

Related Issues (20)

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.