Dear friends,
I have built a simple environment to carry out some tests in order to learn ros (new user).
I have built a urdf and using the appropriate launch I start the gazebo simulation
?xml version="1.0"?>
<launch>
<!-- this launch file corresponds to robot model in ros-pkg/robot_descriptions/pr2/erratic_defs/robots for full erratic -->
<param name="/use_sim_time" value="true" />
<!-- start up wg world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find simple_package)/worlds/MYROBOT.world"/>
</include>
<arg name="model" />
<param name="robot_description" command="$(find xacro)/xacro.py $(arg model)" />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
</node>
<!-- start robot state publisher -->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen" >
<param name="publish_frequency" type="double" value="50.0" />
</node>
<node name="spawn_robot" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -z 0.1 -model robot_model" respawn="false" output="screen" />
</launch>
In another terminal I send a recurring cmd_vel like:
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}'
and I can clearly see that the robot moves in the gazebo simulation.
The problem is when I try to execute the gmapping package. In the terminal when I execute
rosrun gmapping slam_gmapping scan:=/scan odom_frame:=/odom
I get either:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)
or
Illegal instruction (core dumped)
a screenshot of my graph looks like:
Do you have any idea what it goes wrong?
My ros version is indigo
Thanks in advance for your help
UPDATE. I tried to follow the simple tutorial and again I get
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped)
I downloaded the existing bag
Originally posted by angelos.p on ROS Answers with karma: 148 on 2015-07-02
Post score: 0