fixed state publish rate error (from 20hz to 50hz), gazebo scout v2 sim ready

This commit is contained in:
Ruixiang Du
2020-04-02 11:43:29 +08:00
parent a1efd5b609
commit f73a2e2f59
15 changed files with 392 additions and 368 deletions

View File

@@ -14,5 +14,5 @@
<include file="$(find scout_gazebo_sim)/launch/spawn_scout_v2.launch"></include>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find scout_description)/rviz/model_display.rviz" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find scout_description)/rviz/navigation.rviz" />
</launch>

View File

@@ -9,7 +9,7 @@
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="paused" default="true" />
<arg name="use_sim_time" default="false" />
<arg name="use_sim_time" default="true" />
<arg name="gui" default="true" />
<arg name="headless" default="false" />
<arg name="debug" default="true" />

View File

@@ -26,39 +26,5 @@ int main(int argc, char **argv) {
ros::spin();
// // instantiate a robot object
// ScoutBase robot;
// ScoutROSMessenger messenger(&robot, &node);
// // fetch parameters before connecting to robot
// std::string port_name;
// private_node.param<std::string>("port_name", port_name,
// std::string("can0")); private_node.param<std::string>("odom_frame",
// messenger.odom_frame_, std::string("odom"));
// private_node.param<std::string>("base_frame", messenger.base_frame_,
// std::string("base_link")); private_node.param<bool>("simulated_robot",
// messenger.simulated_robot_, false);
// // connect to robot and setup ROS subscription
// if (port_name.find("can") != std::string::npos)
// {
// robot.Connect(port_name);
// ROS_INFO("Using CAN bus to talk with the robot");
// }
// else
// {
// robot.Connect(port_name, 115200);
// ROS_INFO("Using UART to talk with the robot");
// }
// messenger.SetupSubscription();
// publish robot state at 20Hz while listening to twist commands
// ros::Rate rate_20hz(20); // 20Hz
// while (true) {
// messenger.PublishStateToROS();
// ros::spinOnce();
// rate_20hz.sleep();
// }
return 0;
}