Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everything is working except /odom #5

Closed
void-robotics opened this issue Mar 16, 2020 · 3 comments
Closed

Everything is working except /odom #5

void-robotics opened this issue Mar 16, 2020 · 3 comments

Comments

@void-robotics
Copy link

Hello,

I have a launch file that gets everything working in Gazebo but a key function isn't running that handles the odom data.

My launch file:

<launch>

	<!-- default params -->
	<arg name="use_gazebo_gui"	default="false" />
	<arg name="gazebo_world"	default="gazebo_large.world" />
	<arg name="world_only"		default="false" /> 	<!-- for editing the world -->

	<!-- simulator -->
	<include file="$(find gazebo_ros)/launch/empty_world.launch">
		<env name="GAZEBO_RESOURCE_PATH" value="$(find nm_navigation)/conf" />
		<arg name="world_name" value="$(arg gazebo_world)" />

		<arg name="paused" value="false" />
		<arg name="use_sim_time" value="true" />
		<arg name="gui" value="$(arg use_gazebo_gui)" />
		<arg name="debug" value="false" />
		<arg name="verbose" value="false" />
	</include>

	<!-- create robot -->
	<group unless="$(arg world_only)" >
		<arg name="model" default="burger"/>
		<arg name="x_pos" default="0.0"/>
		<arg name="y_pos" default="0.0"/>
		<arg name="z_pos" default="0.0"/>

		<param name="robot_description" command="$(find xacro)/xacro --inorder $(find turtlebot_description)/robots/kobuki_hexagons_astra.urdf.xacro" />

		<node pkg="gazebo_ros" type="spawn_model" name="spawn_urdf" args="-urdf -model kobuki_hexagons_astra -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description" />
	</group>

 	<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" />

</launch>

The output not working in 18.04:

nathan@nathan-vm2:~/newmind$ roslaunch nm_navigation Gazebo.launch 
... logging to /home/nathan/.ros/log/004468c6-67c5-11ea-8e8e-0800272e6e3a/roslaunch-nathan-vm2-28781.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
Deprecated: xacro tag 'kobuki_sim' w/o 'xacro:' xml namespace prefix (will be forbidden in Noetic)
when processing file: /home/nathan/newmind/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_astra.urdf.xacro
Use the following command to fix incorrect tag usage:
find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'

started roslaunch server http://nathan-vm2:45493/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.3
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [28794]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 004468c6-67c5-11ea-8e8e-0800272e6e3a
process[rosout-1]: started with pid [28805]
started core service [/rosout]
process[gazebo-2]: started with pid [28809]
process[spawn_urdf-3]: started with pid [28817]
process[robot_state_publisher-4]: started with pid [28818]
[N=/gazebo,F=GazeboRosApiPlugin::Load-168]: Finished loading Gazebo ROS API Plugin.
[N=/gazebo,F=service::exists-80]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[N=/gazebo,F=service::waitForService-122]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[N=/gazebo,F=GazeboRosApiPlugin::physicsReconfigureThread-2334]: Physics dynamic reconfigure ready.
[N=/gazebo,F=__cxx11::string gazebo::GetRobotNamespace-99]: Camera Plugin: Using the 'robotNamespace' param: '/'
[N=/gazebo,F=GazeboRosCameraUtils::LoadThread-305]: Camera Plugin (ns = /)  <tf_prefix_>, set to ""
[spawn_urdf-3] process has finished cleanly
log file: /home/nathan/.ros/log/004468c6-67c5-11ea-8e8e-0800272e6e3a/spawn_urdf-3*.log
^C[robot_state_publisher-4] killing on exit
[gazebo-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
nathan@nathan-vm2:~/newmind$ 

The output working in 16.04 but using the turtlebot_description installed from apt:
gazebo 16 04

Would you know why this package doesn't launch GazeboRos::readCommonParameter, GazeboRosKobuki::preparePublishTf, or GazeboRosKobuki::setupRosApi? Specifically, I need the advertisement for odom.

@hackroid
Copy link

Same problem with 18.04

@gaunthan
Copy link
Owner

Could you try this #2 (comment) ? It seems related.

@void-robotics
Copy link
Author

I got it working, but not because of the .so file.

I'm not actually sure what I did. I think I added another package but it seems to be working. I will update this task later when I can confirm this fix works; I added the following:

  • kobuki_bumper2pc
  • kobuki_description
  • kobuki_keyop
  • kobuki_msgs
  • kobuki_node
  • kobuki_safety_controller

also sudo apt install ros-melodic-yocs-velocity-smoother

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants