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

mscott's profile - activity

2019-03-08 08:19:11 -0500 received badge  Famous Question (source)
2018-04-11 11:28:20 -0500 received badge  Notable Question (source)
2017-10-23 07:15:10 -0500 received badge  Famous Question (source)
2017-10-17 16:40:05 -0500 commented question Actionlib across multiple computers

Yeah it is... I think the problem may be with sim time.

2017-10-06 11:54:07 -0500 commented question Actionlib across multiple computers

Yes, the message is sent when using RVIZ. Something I noticed: the actionlib script does not work when use_sim_time = tr

2017-10-06 02:29:46 -0500 received badge  Notable Question (source)
2017-10-05 21:16:06 -0500 commented question Actionlib across multiple computers

Those two topics do not echo anything. This is also true for the path topics. I get a 'no messages recieved and simulate

2017-10-05 21:12:50 -0500 received badge  Student (source)
2017-10-05 20:57:01 -0500 received badge  Popular Question (source)
2017-10-05 14:54:51 -0500 commented question Actionlib across multiple computers

Yeah those are all working. I can run nodes on one computer and echo the topics on the other, so I think they're configu

2017-10-05 12:58:06 -0500 asked a question Actionlib across multiple computers

Actionlib across multiple computers I'm working on a project where I need to separate out my simulator and navigation no

2017-03-30 11:36:17 -0500 received badge  Famous Question (source)
2017-02-18 01:45:15 -0500 received badge  Famous Question (source)
2017-01-14 10:58:02 -0500 received badge  Popular Question (source)
2016-11-28 05:42:23 -0500 received badge  Notable Question (source)
2016-11-21 11:41:07 -0500 commented question Return data from a callback function for use in a different function

Okay I think that makes sense, thank you!

2016-11-20 01:04:47 -0500 received badge  Popular Question (source)
2016-11-19 18:43:22 -0500 commented question Return data from a callback function for use in a different function

Thanks for the comments.
JoshMarino: Sure, I generally just set self.x_pos and then use it. The problem in this case is with organization. Since I need to many robots, I need to have them organized properly, not just specify self.x_pos. gvdhoorn: I'm not sure I understand. Could you elaborate?

2016-11-18 16:33:30 -0500 asked a question Return data from a callback function for use in a different function

I am trying to use ROS to control many different robots in a swarm simulation. I need to have access to all of the robots position and velocity. I am using the MORSE simulator, which publishes the position and velocity of each of the robots. What I need my function to do (Python) is to take all of those pieces of data and organizes it so that I can use it for my controller. What I have so far:

##Create robot class##
class robot():

    def __init__(self):
        self.robot_number = robot_number
        self.x_data = 0
        self.y_data = 0
        self.z = 0
        self.x_vel = 0
        self.y_vel = 0
        self.position = []
        print('init1')
    def get_pose(self, pose_topic):
        self.x_pos = rospy.Subscriber(pose_topic, PoseStamped,self.pose_callback)
        return self.x_pos
    def pose_callback(self,data):
        self.x_data = data.pose.position.x
        return self.x_data

class move_feature():
    def __init__(self):
        self.x_position = 0
    def pose(self,pose_topic):
        main_robot = robot()
        self.x_position = main_robot.get_pose(pose_topic)  
        print(self.x_position)


def main(args):
    '''Initializes and cleanup ros node'''
    robot_dictionary = {}

    for i in range(0,robot_number+1):
        robot_name = 'robot%s' % (i)
        robot_dictionary[robot_name] = move_feature()
        pose_topic = '/robot/pose%s' % (i+1)
        vel_topic = '/velocity%s' % (i+1)
        robot_dictionary[robot_name].pose(pose_topic)
    try:
        rospy.spin()
    except KeyboardInterrupt:
        print("Shutting down ROS Image feature detector module")


if __name__ == '__main__':
    rospy.init_node('robot', anonymous=True)
    main(sys.argv)

So I created a robot class which has the function get_pose. I would like get_pose to return the position (right now just the x position) from the topic so that it can be used within the move_feature class. So, in the move_feature, I should just be able to call pose with the position topic and have it return the current position.

I will eventually need it to expand to 100 robots, so organization is very important. Right now, the function does not return the x_value at all... it just returns information about the subscriber. Is this the right way to try to solve this problem?

Thanks in advance!

2016-11-08 10:49:07 -0500 received badge  Enthusiast
2016-11-01 04:18:03 -0500 received badge  Notable Question (source)
2016-10-31 16:51:35 -0500 received badge  Popular Question (source)
2016-10-31 15:30:02 -0500 received badge  Editor (source)
2016-10-31 15:09:50 -0500 commented question Move base publishing incorrect cmd_vel

Yeah I probably should have specified that in my question. Move_base does only work for 2D navigation, but I think that's ok for my system since the input to the controller is 2D. I just need the navigation portion to be in 2D... but I suppose there could be a problem with the odometry.

2016-10-31 12:44:11 -0500 asked a question Move base publishing incorrect cmd_vel

Hi everyone,

For research I use the MORSE simulator platform with ROS as middleware. Things have generally been working out well, but I seem to have run into problems controlling the robot autonomously. I am specifying a waypoint for the robot to fly to, and my hope is that the robot will path plan and fly to the position. Move_base was working very well for me when I was using a simple ATRV type robot, but I want to use it for a dynamically correct quadrotor. The quadrotor controller takes in a velocity and yaw command and then the controller takes care of the dynamics from there. Move_base should publish these velocity commands, which is why I think that it should work well with my setup.

The problem: when I use move_base the published velocity is very incorrect. cmd_vel is only publishing a yaw rate, but generally no linear velocities. Again, the setup used was very similar for a robot which received correct cmd_vel, so I'm struggling to understand why move_base is not publishing the correct velocities.

move_base launch file: <launch>

<!--param name="/use_sim_time" value="true" /-->
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
<remap from="scan" to="/base_scan" />
<!--remap from="scan2" to="camera/scan" /-->
<remap from="odom_frame" to="odom" />
<param name="xmin" value="-60.0"/>
<param name="ymin" value="-60.0"/>
<param name="xmax" value="60.0"/>
<param name="ymax" value="60.0"/>
<param name="delta" value="0.05"/>
<param name="maxUrange" value="120.0"/>
</node>

<node name="amcl" pkg="amcl" type="amcl">
<remap from="/scan" to="/base_scan" />
<remap from="/scan2" to="/camera/scan" />
</node>




<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">

<remap from="odom" to="odom" />
<remap from="map" to="/map" />
<remap from="cmd_vel" to="cmd_vel" />

<!--param name="conservative_reset_dist" value="10.0" /-->
<!--param name="save_pose_rate" value="10" /-->
<!--param name="footprint_padding" value="0.01" /-->
<param name="controller_frequency" value="15.0" />
<!--param name="controller_patience" value="8.0" /-->
<!--param name="planner_frequency" value="6.0" /-->
<!--param name="oscillation_distance" value="0.1" /-->
<!--param name="heading_lookahead" value="2.0" /-->
<param name="heading_scoring_timestep" value="2.0" />



<rosparam file="$(find morse_2dnav)/morse_move_base/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find morse_2dnav)/morse_move_base/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find morse_2dnav)/morse_move_base/local_costmap_params.yaml" command="load" />
<rosparam file="$(find morse_2dnav)/morse_move_base/global_costmap_params.yaml" command="load" />
<rosparam file="$(find morse_2dnav)/morse_move_base/base_local_planner_params.yaml" command="load" />
<!--param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" /-->
<!--rosparam file="$(find morse_2dnav)/morse_move_base/dwa_planner_ros.yaml" command="load" /-->

</node>

</launch>

common_costmap_params:

obstacle_range: 10.0 
raytrace_range: 4.0 
clearing: false 
transform_tolerance: 10.0 
footprint: [[0.35, 0.35], [-0.35, 0.35], [-0.35, -0.35], [0.35, -0.35]] 
#robot_radius: 0.25 
inflation_radius: 0.55 

observation_sources: laser_scan_sensor camera_sensor
#observation_sources: laser_scan_sensor
#observation_sources: camera_sensor

laser_scan_sensor: {sensor_frame: base_laser_link, data_type: LaserScan, topic: base_scan, marking: true, clearing: true}

base_local_planner params:

TrajectoryPlannerROS: 
  max_vel_x: 3.0
  #min_vel_x: 0.1 
  #max_vel_theta: 1.0 
  #min_in_place_vel_theta: 1.0 

  acc_lim_theta: 5.0 
  #acc_lim_x: 0.5 
  #acc_lim_y: 0.5


  heading_scoring: true 
  heading_scoring_timestep: 15.0 
  holonomic_robot: false
  meter_scoring ...
(more)
2016-07-21 12:17:18 -0500 asked a question Slam_Gmapping will not run with an increased simulator time (Morse Simulator)

I am currently running ros indigo on Ubuntu 14.04. I also use the robotics Simulator MORSE with ROS as middleware. For my simulations I have the robot (quadrotor) fly through the MORSE environment, and use ROS nodes to scan the environment and record the occupancy grid data. I use gmapping (rosrun gmapping slam_gmapping scan:=/base_scan _odom_frame:=/odom) for my laser scanning/mapping. Everything was working fine, I could fly the robot manually, give a goal via RVIZ, write python scripts for waypoints, ect. The problem: The simulations I run take quite a while to run, so I am now speeding up the simulation in MORSE and would like ROS to record the data appropriately. Running gmapping will now not work when I increase the simulation time. No error messages are really given, gmapping will simply not run, which makes my launch files not run either. I believe the problem is with time, as gmapping probably needs to have a parameter added to it to make sure it is properly synced with MORSE.

My launch files for reference:

Launch file1:

<launch>
          <!-- urdf xml robot description loaded on the Parameter Server-->
          <param name="robot_description" textfile="/home/exalabs5/full_simulation/Slam-waypoint-Navigation/atrv_sim/quadrotor.urdf" />

          <!-- source that publishes the joint positions as a sensor_msgs/JointState -->
          <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

          <!-- publish all the frames to TF -->
          <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

          <node pkg="tf" type="static_transform_publisher" name="base_link_to_base_laser_link" args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /base_laser_link 100" />
          <node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0  /base_footprint /base_link 100"  />

        </launch>

Launch file 2:

<launch>

    <node name="amcl" pkg="amcl" type="amcl">
        <remap from="/scan" to="/base_scan" />
    </node>



    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">

    <remap from="map" to="/map" />

    <!--param name="footprint_padding" value="0.01" /-->
    <!--param name="controller_frequency" value="0.5" /-->
    <!--param name="controller_patience" value="8.0" /-->
    <!--param name="planner_frequency" value="6.0" /-->
    <!--param name="oscillation_distance" value="0.1" /-->
    <!--param name="heading_lookahead" value="2.0" /-->


    <rosparam file="$(find morse_2dnav)/morse_move_base/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find morse_2dnav)/morse_move_base/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find morse_2dnav)/morse_move_base/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find morse_2dnav)/morse_move_base/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find morse_2dnav)/morse_move_base/base_local_planner_params.yaml" command="load" />
    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    <rosparam file="$(find morse_2dnav)/morse_move_base/dwa_planner_ros.yaml" command="load" />


    </node>


</launch>

Any suggestions would be very helpful, thanks!