Code Monkey home page Code Monkey logo

human_model's Introduction

human_model's People

Contributors

renaudviry avatar

Stargazers

January Desk avatar

Watchers

 avatar

Forkers

yanzqing

human_model's Issues

Cannot see human in Gazebo

Hi there,
I am interested in adding a human in gazebo and so I am using your code. I cloned ur git repo into my workspace and I added a function like :
void Husky::addHuman(){
ROS_INFO("::executing add human ()");
// make the service call to spawn model
ros::service::waitForService("gazebo/spawn_urdf_model");
gazebo_msgs::SpawnModel spawnModel;
std::string urdf_filename = "human.urdf";
std::ifstream file("/home/toshiba/catkin_ws/src/gazebo_husky/human_model/urdf/human.urdf");
ROS_DEBUG("loading file: %s , ***
******************************",urdf_filename.c_str()); // to check if URDF file was read correctly.
std::string line;

while(!file.eof()) // Parse the contents of the given urdf in a string
{
  std::getline(file,line);
  model.request.model_xml+=line;
}
file.close();

geometry_msgs::Pose pose;
pose.position.x = pose.position.y = 1; pose.position.z = 0;
pose.orientation.w = 1.0; pose.orientation.x = pose.orientation.y = pose.orientation.z = 0;
model.request.initial_pose = pose;

model.request.model_name="human_model";
model.request.reference_frame="world";
gazebo_spawn_clt_.call(model); //Call the service

ROS_INFO(" Finished loading human -------------------------------------");

}

Then I simply call this function in my main.cpp file but I do not see any human in gazebo. Am I missing something in my code/CmakeLists.txt/package.xml/launch file ?
Please advise.

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.