Add simulation launch in turtlebot_follower #142

Merged
merged 2 commits into from Mar 4, 2016

Conversation

Projects
None yet
2 participants
@nampi
Contributor

nampi commented Feb 9, 2016

  1. Launch nodes "follower_velocity_smoother" and "turtlebot_follower" as standalone node.
  2. Insert "velocity_smoother.launch.xml" file in simulation block.
  3. It works in gazebo_concert.
+ <param name="decel_factor" value="2.0"/>
+ </node>
+
+ <param name="camera/rgb/image_color/compressed/jpeg_quality" value="22"/>

This comment has been minimized.

@tfoote

tfoote Feb 9, 2016

Contributor

Since this line through line 65 is duplicated in the other half of the if statement, we should pull it out instead of repeating it.

@tfoote

tfoote Feb 9, 2016

Contributor

Since this line through line 65 is duplicated in the other half of the if statement, we should pull it out instead of repeating it.

+ <node pkg="topic_tools" type="throttle" name="camera_throttle"
+ args="messages camera/rgb/image_color/compressed 5"/>
+
+ <node pkg="nodelet" type="nodelet" name="turtlebot_follower"

This comment has been minimized.

@tfoote

tfoote Feb 9, 2016

Contributor

This block could be reused if instead of changing it to standalone, we simply launch a nodelet manager where it's expecting the manager at /camera/camera_nodelet_manager inside this branch of the if statement.

@tfoote

tfoote Feb 9, 2016

Contributor

This block could be reused if instead of changing it to standalone, we simply launch a nodelet manager where it's expecting the manager at /camera/camera_nodelet_manager inside this branch of the if statement.

@@ -40,6 +40,43 @@
</node>
</group>
<group if="$(arg simulation)">
- <!-- not supported.. -->
+ <node pkg="nodelet" type="nodelet" name="follower_velocity_smoother"

This comment has been minimized.

@tfoote

tfoote Feb 9, 2016

Contributor

This content looks the same to me as the include file above except for the nodelet manager. If we launch a manager as described in my comment below. We could add an argument to the included launch file which passes the manager name, and then in the regular block pass /mobile_base_nodelet_manager but in the simulation case pass /camera/camera_nodelet_manager

How to pass an argument to in include tag: http://wiki.ros.org/roslaunch/XML/include
How to use an argument in a launch file: http://wiki.ros.org/roslaunch/XML/arg

@tfoote

tfoote Feb 9, 2016

Contributor

This content looks the same to me as the include file above except for the nodelet manager. If we launch a manager as described in my comment below. We could add an argument to the included launch file which passes the manager name, and then in the regular block pass /mobile_base_nodelet_manager but in the simulation case pass /camera/camera_nodelet_manager

How to pass an argument to in include tag: http://wiki.ros.org/roslaunch/XML/include
How to use an argument in a launch file: http://wiki.ros.org/roslaunch/XML/arg

@tfoote

This comment has been minimized.

Show comment
Hide comment
@tfoote

tfoote Feb 9, 2016

Contributor

Hi @nampi, this looks good overall. Thanks for putting it together and it looks like it will work. I've made some suggestions which will make it slightly more complicated. But my goal is that it will be more maintainable in the long run. For example I want to have the same parameters in both simulation and the real world. And if they are written in two places, every time you change one you need to change the other, and inevitably it will get out of sync eventually when someone makes a mistake.

Contributor

tfoote commented Feb 9, 2016

Hi @nampi, this looks good overall. Thanks for putting it together and it looks like it will work. I've made some suggestions which will make it slightly more complicated. But my goal is that it will be more maintainable in the long run. For example I want to have the same parameters in both simulation and the real world. And if they are written in two places, every time you change one you need to change the other, and inevitably it will get out of sync eventually when someone makes a mistake.

@nampi

This comment has been minimized.

Show comment
Hide comment
@nampi

nampi Feb 12, 2016

Contributor

@tfoote Thanks a lot! I agree with you.

  1. Added the "navigation_topic" argument, because the program didn't work in simulation with "/" at the beginning.
   <arg name="navigation_topic" value="/cmd_vel_mux/input/navi"/>
   
  1. Added node "nodelet manager" inside the simulation branch.
Contributor

nampi commented Feb 12, 2016

@tfoote Thanks a lot! I agree with you.

  1. Added the "navigation_topic" argument, because the program didn't work in simulation with "/" at the beginning.
   <arg name="navigation_topic" value="/cmd_vel_mux/input/navi"/>
   
  1. Added node "nodelet manager" inside the simulation branch.
@tfoote

This comment has been minimized.

Show comment
Hide comment
@tfoote

tfoote Feb 16, 2016

Contributor

Reading this over it looks good.

I want to test it on a real robot before adding it though. I'll try to get one together this week.

Contributor

tfoote commented Feb 16, 2016

Reading this over it looks good.

I want to test it on a real robot before adding it though. I'll try to get one together this week.

@tfoote tfoote referenced this pull request in tfoote/turtlebot Mar 3, 2016

Closed

Added my_turtlebot_follower #5

tfoote added a commit that referenced this pull request Mar 4, 2016

Merge pull request #142 from nampi/simul
Add simulation launch in turtlebot_follower

@tfoote tfoote merged commit 63e91be into turtlebot:indigo Mar 4, 2016

tfoote added a commit that referenced this pull request Mar 4, 2016

the sim directory no longer exists
It was implicitly removed in #142
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment