ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Penny's profile - activity

2016-06-05 06:40:36 -0500 received badge  Notable Question (source)
2016-06-05 06:40:36 -0500 received badge  Popular Question (source)
2016-06-05 06:40:36 -0500 received badge  Famous Question (source)
2015-06-22 00:07:35 -0500 marked best answer Acceleration in Gazebo

Hello there,

I have a robot model that I spawn in Gazebo, and I have developed a client, which indicates its position and velocities. Is there any way to indicate its acceleration, is there any service to call in order to declare it?

2014-04-20 06:48:44 -0500 marked best answer Where is platform.h?

I wrote a publisher in c++ and I must include platform.h, but I cannot find it in any directory, and include the directory.Where is platform.h?

2014-04-20 06:48:37 -0500 marked best answer Create a pool in Gazebo
<?xml version="1.0" ?> 
  <robot name="my_robot">

   <link name="base_link">   
     <inertial>    
       <origin xyz="0 0 0" rpy="0 0 0"  />    
       <mass value="100.0" />  
     <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="100.0" iyz="0.0" izz="1.0" />         
   </inertial>   

   <visual> 
     <origin xyz="0 0 0" rpy="0 0 0" />    
     <geometry>
        <box size="-4.8 3 0.1" />     
     </geometry>  
     <material name="white">       
        <color rgba="1 1 1 1"/>    
     </material> 
   </visual>     

   <collision>
     <origin xyz="0 0 0" rpy="0 0 0" />    
     <geometry> 
       <box size="-4.8 3 0.1" />     
     </ geometry> 
   </collision>  
 </link> 

 <link name="child_link">

   <inertial> 
      <origin xyz="2.45 0 0.75" /> 
      <mass value="10.0" />     
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="100.0" iyz="0.0" izz="1.0" /> 
   </inertial>  

   <visual> 
     <geometry>
       <box size="0.1 3 1.5"/>  
     </geometry>  
     <origin xyz="2.45 0.75" />  
     <material name="white">    
       <color rgba="1 1 1 1"/>  
     </material>   
   </visual> 

   <collision>  
     <origin xyz="2.45 0 0.75" />    
     <geometry> 
        <box size="0.1 3 1.5" />     
     </ geometry> 
   </collision>    
 </link>  

 <joint name="base_link_to_child_link" type="fixed">
   <parent link="base_link" /> 
   <child link="child_link" /> 
   <axis="0 1 0" />
   <calibration rising="0.0" /> 
 </joint> 
</robot>

Hello.

I am new in ros. This is my urdf, I want to create a pool, and i tried to make a rectangular for a base and with joints to unite each other rectangular which will represent one of the four frames. In this urdf i wrote the base which is the first link and the left frame which is the second link, and i unite them with a joint. When i run this urdf, only the base (the first link) is showed in gazebo, what is the problem??? Is there any other way to create a pool without joints, only with one link?

2014-03-02 14:01:37 -0500 received badge  Popular Question (source)
2014-03-02 14:01:37 -0500 received badge  Notable Question (source)
2014-03-02 14:01:37 -0500 received badge  Famous Question (source)
2014-01-28 17:25:55 -0500 marked best answer Spawn a blender file in Gazebo

I had created a 3D model in Blender and had managed to spawn it in Gazebo, but an error occurred and I had to format my computer. After the format with the same source code I am not able to spawn the model in Gazebo. My urdf is:

<robot name="pool">

<link name="base_link">

 <inertial>
   <mass value="100.0" />
   <origin xyz="0 0 0" />
  <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="1.0"  iyz="0.0"  izz="1.0" />

 </inertial>

 <visual>
   <origin xyz="0 0 0" rpy="0 0 0" />
   <geometry>
     <mesh filename="package://gazebo_worlds/Media/models/pinky.3ds" />
   </geometry>
 </visual>

 <collision>
   <origin xyz="0 0 0" rpy="0 0 0" />
   <geometry>
     <mesh filename="package://gazebo_worlds/Media/models/pinky.3ds" />
   </geometry>
 </collision>

</link> </robot>

What is wrong? When I rosrun, no errors occurre but no model appears in Gazebo either.

2014-01-28 17:25:21 -0500 marked best answer Spawn an xml model in gazebo

This is my xml file(name:pool.xml):

<robot name="simple_pool"> <link name="base_link"> <inertial> <mass value="100.0"/> <origin xyz="0 0 0"/> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/> </inertial> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://pool_party/meshes/finalpool.dae"/> </geometry> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0 "/> <geometry> <mesh filename="package://pool_party/meshes/finalpool.dae"/> </geometry> </collision> </link> <gazebo reference="base_link"> <material>Gazebo/White</material> </gazebo> </robot>

I used the command line: rosrun gazebo spawn_model -file pwd/pool.xml -urdf -z 1 -model my_pool

I have the master node running(empty_world.launch), but after the command line nothing appears. How can I spawn the current xml file (if everything is ok with it) in an empty_world.launch??

2014-01-28 17:25:15 -0500 marked best answer Problem with my launch file

I have created a client (named kouna_to_asistola_client.cpp located into the turtlebot2 pkg), that moves turtlebot in gazebo. it works with the rosrun command. i want to make it work with the roslaunch command. but when i try to include the node in the launch file i get the following error:

[ERROR] [1333630193.884536832]: Failed to call service for setmodelstate

[kouna_to_asistola-5] process has died [pid 26078, exit code 1].
log files: /home/megalicious/.ros/log/d6c8e168-7f1d-11e1-bb54-14dae9034270/kouna_to_asistola-5*.log

this is my client:

#include "ros/ros.h"
#include "gazebo_msgs/SetModelState.h"
#include "gazebo_msgs/GetModelState.h"
#include "gazebo_msgs/GetPhysicsProperties.h"

int main(int argc, char** argv)

{

    ros::init(argc, argv, "kouna_to_asistola");

    ros::NodeHandle n;

    for (double t=0.1; t<=20000; t+=0.001)
    {


    ros::ServiceClient gmscl=n.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
    gazebo_msgs::GetModelState getmodelstate;
    getmodelstate.request.model_name ="turtlebot";
    gmscl.call(getmodelstate);

    ros::ServiceClient gphspro=n.serviceClient<gazebo_msgs::GetPhysicsProperties>("/gazebo/get_physics_properties");
    gazebo_msgs::GetPhysicsProperties getphysicsproperties;
    gphspro.call(getphysicsproperties);

    geometry_msgs::Pose pose;

    geometry_msgs::Twist twist;

    twist.linear.x = 0.020;
    twist.linear.y = 0.020;
    twist.linear.z = 0.0;
    twist.angular.x = 0.0;
    twist.angular.y = 0.0;
    twist.angular.z = 0.0;

    pose.position.x = getmodelstate.response.pose.position.x + 0.05;
    pose.position.y = getmodelstate.response.pose.position.y + 0.05;
    pose.position.z = 0.0;
    pose.orientation.x = 0.0;
    pose.orientation.y = 0.0;
    pose.orientation.z = 0.0;

    ros::ServiceClient client = n.serviceClient<gazebo_msgs::SetModelState>("/gazebo/set_model_state");

    gazebo_msgs::SetModelState setmodelstate;
    gazebo_msgs::ModelState modelstate;
    modelstate.model_name ="turtlebot";
    modelstate.pose = pose;
    modelstate.twist = twist;

    setmodelstate.request.model_state=modelstate;


if (client.call(setmodelstate))
      {
       ROS_INFO("BRILLIANT AGAIN!!!");
       ROS_INFO("%f",getphysicsproperties.response.time_step);
       ROS_INFO("%f",modelstate.pose.position.x);
       ROS_INFO("%f",modelstate.pose.position.y);
       ROS_INFO("%f",modelstate.twist.linear.x);
       ROS_INFO("%f",getmodelstate.response.pose.position.y);
      }
     else
      {
       ROS_ERROR("Failed to call service for setmodelstate ");
       return 1;
      }

  }


}
2014-01-28 17:25:09 -0500 marked best answer how to find,open, read, and modify an existing node(robot_state_publisher node) in ros?

I have downloaded the turtlebot simulator and i run the command rxgraph to see the nodes. I want to find and modify two of them (robot_state_publisher, robot_pose_ekf). is it possible?? how??

2014-01-28 17:24:57 -0500 marked best answer Unable to import mesh file

I have created a launch file:

<launch>

  <!-- start gazebo with an simple world -->
  <param name="/use_sim_time" value="true" />

  <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/pool.world" respawn="false" output="screen"/>

</launch>

My .world file contains the below about my mesh file:

<model:physical name="pool">
   <xyz>0.0 0.0 0.9</xyz>
   <rpy>0 0 0</rpy>
   <static>true</static>
   <body:trimesh name="pool">
   <geom:trimesh name ="pool_geom">
     <scale>0.0254 0.0254 0.0254</scale>
     <mesh>finalpool.dae</mesh>
     <visual>
      <scale>0.0254 0.0254 0.0254</scale>
      <mesh>finalpool.dae</mesh>
     </visual>
   </geom:trimesh>
   </body:trimesh>
  </model:physical>

and I used the command line:

roslaunch gazebo_worlds pool_world.launch

but I get this error:

Error: [/tmp/buildd/ros-electric-simulator-gazebo-1.4.9/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/AssimpLoader.cc:37]
Importer Error:Collada: File came out empty. Something is wrong here./tmp/buildd/ros-electric-simulator-gazebo-1.4.9/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/AssimpLoader.cc:38 : Exception: Unable to import mesh file[/opt/ros/electric/stacks/simulator_gazebo/gazebo_worlds/Media/models/finalpool.dae] using assimp

Error: [/tmp/buildd/ros-electric-simulator-gazebo-1.4.9/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/MeshManager.cc:131]
Error loading mesh[/opt/ros/electric/stacks/simulator_gazebo/gazebo_worlds/Media/models/finalpool.dae]
Error: [/tmp/buildd/ros-electric-simulator-gazebo-1.4.9/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/MeshManager.cc:132]
/tmp/buildd/ros-electric-simulator-gazebo-1.4.9/debian/ros-electric-simulator-gazebo/opt/ros/electric/stacks/simulator_gazebo/gazebo/build/gazebo/server/AssimpLoader.cc:38 : Exception: Unable to import mesh file[/opt/ros/electric/stacks/simulator_gazebo/gazebo_worlds/Media/models/finalpool.dae] using assimp

How can I fix this?

2014-01-28 17:24:56 -0500 marked best answer ODE in gazebo

Where is ODE physics engine in gazebo, where is it used exactly?

2014-01-28 17:24:56 -0500 marked best answer Position in gazebo

I made a client, but when I rosrun it, I do not get any errors but I do not get either what I want.

#include "ros/ros.h"
#include "gazebo_msgs/SetModelState.h"
#include "gazebo_msgs/GetModelState.h" 
#include "gazebo_msgs/GetPhysicsProperties.h"
#include "gazebo_msgs/ModelState.h"

  int main(int argc, char** argv)
   {

    ros::init(argc, argv, "my_node_test");

    ros::NodeHandle n;

    ros::ServiceClient gpp_c=n.serviceClient<gazebo_msgs::GetPhysicsProperties>("/gazebo/get_physics_properties");
    gazebo_msgs::GetPhysicsProperties getphysicsproperties;
    gpp_c.call(getphysicsproperties);  

    double t=0.1;

    t=getphysicsproperties.response.time_step + t;

    ros::ServiceClient gms_c = n.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
    gazebo_msgs::GetModelState getmodelstate;
    gms_c.call(getmodelstate);

    geometry_msgs::Twist twist;
    twist.linear.x = 2.0;
    twist.linear.y = 2.0;
    twist.linear.z = 0.0;
    twist.angular.x = 0.0;
    twist.angular.y = 0.0;
    twist.angular.z = 0.0;

    geometry_msgs::Pose pose;
    pose.position.x = getmodelstate.response.pose.position.x + getphysicsproperties.response.time_step*twist.linear.x;
    pose.position.y = getmodelstate.response.pose.position.y+3.0;
    pose.position.z = getmodelstate.response.pose.position.z+4.5;
    pose.orientation.x = 0.0;
    pose.orientation.y = 0.0;
    pose.orientation.z = 0.0;

    ros::ServiceClient client = n.serviceClient<gazebo_msgs::SetModelState>("/gazebo/set_model_state");
    gazebo_msgs::SetModelState setmodelstate;

    gazebo_msgs::ModelState modelstate;
    modelstate.model_name ="my_robot";
    modelstate.pose = pose;
    modelstate.twist = twist;

    setmodelstate.request.model_state=modelstate;         

     if (client.call(setmodelstate))
      {
       ROS_INFO("BRILLIANT AGAIN!!!");
       ROS_INFO("%f",getphysicsproperties.response.time_step);
       ROS_INFO("%f",modelstate.pose.position.x);
       ROS_INFO("%f",modelstate.pose.position.y);
       ROS_INFO("%f",modelstate.twist.linear.x);
       ROS_INFO("%f",getmodelstate.response.pose.position.y);
      }
     else
      {
       ROS_ERROR("Failed to call service for setmodelstate ");
       return 1;
      }



     return 0;
   }
2014-01-28 17:23:39 -0500 marked best answer Gazebo service through c++ code

I have created a server and client about set model state service of gazebo. This is the error I get when I run make:

/home/phadjic/ros_workspace/pool_party/src/client.cpp: In function ‘int main(int, char)’: /home/phadjic/ros_workspace/pool_party/src/client.cpp:36:39: error: no match for ‘operator=’ in ‘setmodelstate.gazebo_msgs::SetModelState::request.gazebo_msgs::SetModelStateRequest_<std::allocator<void> >::model_state = modelstate’ /opt/ros/electric/stacks/simulator_gazebo/gazebo_msgs/msg_gen/cpp/include/gazebo_msgs/ModelState.h:23:20: note: candidate is: gazebo_msgs::ModelState_<std::allocator<void> >& gazebo_msgs::ModelState_<std::allocator<void> >::operator=(const gazebo_msgs::ModelState_<std::allocator<void> >&) /home/phadjic/ros_workspace/pool_party/src/client.cpp:39:22: error: ‘SetModelState’ was not declared in this scope /home/phadjic/ros_workspace/pool_party/src/client.cpp:42:8: error: no matching function for call to ‘print(int, log4cxx::Logger&, ros::console::Level&, const char [54], int, const char [22], double&)’ /opt/ros/electric/stacks/ros_comm/tools/rosconsole/include/ros/console.h:132:22: note: candidates are: void ros::console::print(ros::console::FilterBase, log4cxx::Logger, ros::console::Level, const char, int, const char, const char, ...) /opt/ros/electric/stacks/ros_comm/tools/rosconsole/include/ros/console.h:136:22: note: void ros::console::print(ros::console::FilterBase, log4cxx::Logger, ros::console::Level, const std::stringstream&, const char, int, const char)

The lines of my client file mentioned above are:

ros::ServiceClient client = n.serviceClient<gazebo_msgs::setmodelstate("/gazebo_msgs/SetModelState"); 
gazebo_msgs::SetModelState setmodelstate;
setmodelstate.request.model_state=modelstate;
client.call(setmodelstate); 

if (client.call(setModelState))
{
   ROS_INFO("BRILLIANT!!!");
   ROS_INFO(start_pose.position.x);
}
else
{
   ROS_ERROR("Failed to call service ");
   return 1;
}
2014-01-28 17:23:34 -0500 marked best answer Gazebo process dies everytime I roslaunch

This is the error I get everytime I roslaunch:

Unsupported shadows type: "stencilAdditive". Supported types are "stencil" and "texture". Not rendering shadows.
Param [quickStepPreconIters] is deprecated: [replace quickStepPreconIters with stepPreconIters]
Param [quickStep] is deprecated: [replace quickStep with stepType]
Param [quickStepIters] is deprecated: [replace quickStepIters with stepIters]
Param [quickStepW] is deprecated: [replace quickStepW with stepW]
ScopedName[gplane]
ScopedName[desk4_model]
ScopedName[pool]
[gazebo-2] process has died [pid 3857, exit code -11].

can you provide me with some help please?

2014-01-28 17:23:30 -0500 marked best answer circular dependency

Hi,

I have created a package and when I put the command line rosmake, I get this result. Where can I find this broken dependency?

[rospack] woah! expanding the dependency tree made it blow up.
 There must be a circular dependency somewhere.
[rospack] circular dependency


CMake Error at /opt/ros/electric/ros/core/rosbuild/public.cmake:125 (message):


  Failed to invoke rospack to get compile flags for package 'testing'.  Look
  above for errors from rospack itself.  Aborting.  Please fix the broken
  dependency!

Call Stack (most recent call first):
  /opt/ros/electric/ros/core/rosbuild/public.cmake:202 (rosbuild_invoke_rospack)
  CMakeLists.txt:12 (rosbuild_init)


-- Configuring incomplete, errors occurred!
make: *** [all] Error 1
2014-01-28 17:23:29 -0500 marked best answer Publishers and Subscribers in ros

Hi,

I have created a package in my ros_workspace(directory),and I have tried to write a simple publisher into the "Codeblocks" software, in the package directory, but it seems that the software cannot compile the program at all because it cannot find the headers needed. Although, the headers exist, I found them and add the paths to the program, but there are lots of them, I can't everytime add 10 or more paths for a publisher only. Does the fact that I did not create beginner_tutorials package with turtle node and all that first, matters?is something in those files needed?