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

madmax's profile - activity

2023-05-14 18:59:42 -0500 marked best answer Laser scan to point cloud to octomap - strange result

Hi,

I have a laser scanner mounted on an arm. With laser_pipeline and pcl_assembler, I build a point cloud and pass it to the octomap_server. The pcl_assembler runs every 3 seconds.

My problem is, in simulation and Gazebo all works fine.
But on the real system, the octomap is completely wrong.

What could be the problem here, or is there anything that works better?

Made 2 screenshots, first is just the laser scans, looks great. TF should also be ok. The 2nd one is the assembled_cloud.
The 3rd one is the octomap.

Laser scans image description octomap

<?xml version="1.0"?>
<launch>

<include file="$(find powerball_peak_start)/launch/powerball.launch" />

<!--<include file="$(find powerball_vscom_start)/launch/powerball.launch" />-->

<!-- Laser Scanner -->
<node ns="LMS100" name="lms100" pkg="LMS1xx" type="LMS100" > 

    <param name="host" value="192.168.5.80"/>
    <param name="frame_id" value="/laser_link"/>

</node>

<!-- Laser Pipeline -->
<node type="laser_scan_assembler" pkg="laser_assembler" name="my_assembler">
    <remap from="scan" to="/LMS100/scan"/>
    <param name="max_scans" type="int" value="400" />
    <param name="fixed_frame" type="string" value="/laser_link" />
</node>

<!-- Point cloud publisher -->
<node name="periodic_snapshotter" pkg="pcl_assembler" type="periodic_snapshotter" respawn="false" output="screen" />

<!-- Octomap Server -->
<node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
    <param name="resolution" value="0.05" />

    <param name="frame_id" type="string" value="base_link" />

    <param name="max_sensor_range" value="20.0" />

    <param name="latch" value="false" />
    <remap from="cloud_in" to="assembled_cloud" />

</node>

<!-- Rviz -->
<node name="rviz" pkg="rviz" type="rviz" respawn="false" output="screen" />
 </launch>
2023-01-21 14:24:48 -0500 marked best answer Starting point of teb_local_planner

Right now i have a car which I want to control with the teb_local_planner at walking speed.
And as the base_link is above the rear axle, the plan is constructed from there through the footprint and out of the front bumper.

So my question is, as the plan inside the footprint is irrelevant, can I use the front bumper as the starting point for the planner?

local path

2021-11-24 12:50:59 -0500 received badge  Popular Question (source)
2021-11-24 12:50:59 -0500 received badge  Notable Question (source)
2021-09-20 13:33:47 -0500 received badge  Famous Question (source)
2021-08-30 22:09:43 -0500 received badge  Famous Question (source)
2021-05-06 10:19:22 -0500 marked best answer How to program a series of different tasks? SMACH?

Hi,

I am wondering how I can learn my robot to execute a series of tasks.

Like this example:
First: move to a position on map
Second: say something
Third: move to docking station

I came across SMACH and built a state machine.
But when it comes to actions and sending goals like PoseWithCovarianceStamped, I don't know how to do it. I looked through some tutorials but it didn't help me a lot.

Also the switching between C++ and Python is a bit annoying to me, because I practically programme C++ and don't really know Python.

Is it an acceptable solution to just have a main.cpp and use "if" clauses as a "state machine"?
So I can programme all in C++?

Help appreciated :)

2021-04-09 11:00:00 -0500 received badge  Famous Question (source)
2021-04-01 04:00:01 -0500 received badge  Famous Question (source)
2021-03-03 03:20:54 -0500 marked best answer Navfn vs Smac Planner

Was just trying out the new smac planner in foxy and I saw some unexpected behavior.

It looks like smac planner is ignoring costs when obstacles are too small.
Navfn on the other side doesn't show this behavior.

Navfn:

navfn gif

Smac:

smac gif

Costmap looks fine, and on the smac planner param side I think they seem reasonable.
But I am not sure if there is a bug or misconfiguration on my side.

planner_server:
  ros__parameters:
    planner_plugins: ["GridBased"]
    use_sim_time: True

    # smac_planner/SmacPlanner is replaced with nav2_navfn_planner/NavfnPlanner, params are from smac, but navfn works better right now
    GridBased:
      plugin: "nav2_navfn_planner/NavfnPlanner"
      tolerance: 0.5                    # tolerance for planning if unable to reach exact pose, in meters, for 2D node
      downsample_costmap: false         # whether or not to downsample the map
      downsampling_factor: 1            # multiplier for the resolution of the costmap layer (e.g. 2 on a 5cm costmap would be 10cm)
      allow_unknown: false              # allow traveling in unknown space
      max_iterations: -1                # maximum total iterations to search for before failing
      max_on_approach_iterations: 1000  # maximum number of iterations to attempt to reach goal once in tolerance, 2D only
      max_planning_time: 2.0            # max time in s for planner to plan, smooth, and upsample. Will scale maximum smoothing and upsampling times based on remaining time after planning.
      smooth_path: false                # Whether to smooth searched path
      motion_model_for_search: "DUBIN"  # 2D Moore, Von Neumann; SE2 Dubin, Redds-Shepp
      angle_quantization_bins: 72       # For SE2 node: Number of angle bins for search, must be 1 for 2D node (no angle search)
      minimum_turning_radius: 0.20      # For SE2 node & smoother: minimum turning radius in m of path / vehicle
      reverse_penalty: 2.1              # For Reeds-Shepp model: penalty to apply if motion is reversing, must be => 1
      change_penalty: 0.20              # For SE2 node: penalty to apply if motion is changing directions, must be >= 0
      non_straight_penalty: 1.05        # For SE2 node: penalty to apply if motion is non-straight, must be => 1
      cost_penalty: 1.3                 # For SE2 node: penalty to apply to higher cost zones

      smoother:
        smoother:
          w_curve: 30.0                 # weight to minimize curvature of path
          w_dist: 0.0                   # weight to bind path to original as optional replacement for cost weight
          w_smooth: 30000.0             # weight to maximize smoothness of path
          w_cost: 0.025                 # weight to steer robot away from collision and cost
          cost_scaling_factor: 10.0     # this should match the inflation layer's parameter

        # I do not recommend users mess with this unless they're doing production tuning
        optimizer:
          max_time: 0.10                # maximum compute time for smoother
          max_iterations: 500           # max iterations of smoother
          debug_optimizer: false        # print debug info
          gradient_tol: 1.0e-10
          fn_tol: 1.0e-20
          param_tol: 1.0e-15
          advanced:
            min_line_search_step_size: 1.0e-20
            max_num_line_search_step_size_iterations: 50
            line_search_sufficient_function_decrease: 1.0e-20
            max_num_line_search_direction_restarts: 10
            max_line_search_step_expansion: 50
2021-02-27 15:24:48 -0500 received badge  Notable Question (source)
2021-02-26 03:42:43 -0500 received badge  Nice Question (source)
2021-02-26 02:54:22 -0500 commented question Navfn vs Smac Planner

I used foxy debs. Issue is opened here.

2021-02-26 01:57:55 -0500 received badge  Popular Question (source)
2021-02-24 17:07:52 -0500 marked best answer Best way to add new controller which has a custom path as input

If I have a custom controller, like a pure pursuit for example, which has a custom path as input.
How could I add this controller to nav2?

I would like to have it as a plugin to the default controller server but then I need to implement the default interface which has nav_msgs::path as input:

virtual void setPlan(const nav_msgs::msg::Path & path) = 0;

And I have a custom one, say pure_pursuit::path.

So the best idea I have is to create a custom controller server with it's own costmap.
But then I have two copies of the same costmap running...

How would you guys accomplish this?

2021-02-22 03:31:23 -0500 edited question Navfn vs Smac Planner

Navfn vs Smac Planner Was just trying out the new smac planner in foxy and I saw some unexpected behavior. It looks l

2021-02-22 03:29:48 -0500 asked a question Navfn vs Smac Planner

Navfn vs Smac Planner Was just trying out the new smac planner in foxy and I saw some unexpected behavior. It looks l

2021-01-28 10:09:54 -0500 received badge  Notable Question (source)
2020-12-30 04:26:54 -0500 received badge  Famous Question (source)
2020-12-22 15:15:52 -0500 received badge  Famous Question (source)
2020-10-26 13:48:37 -0500 marked best answer Can't receive data in python node

Hi,

I don't know how to debug this:
I took the python demo listener and changed it to subscribe to odometry.
But when I subscribe to my running cpp node which publishes odom, I don't receive any data ...
If I use a cmd publisher like ros2 topic pub /odom nav_msgs/msg/Odometry, listener receives data..
Also if I use my own cpp odom publisher and the cmd line publisher at the same time, I only receive data from cmd publisher...

But echo gives me data from both publishers...

Namespace is correct, topic is correct.

I am running on empty now ...

from std_msgs.msg import String
from nav_msgs.msg import Odometry

class Listener(Node):

    def __init__(self):
        super().__init__('odom_listener')
        self.sub = self.create_subscription(Odometry, 'odom', self.chatter_callback, 10)

    def chatter_callback(self, msg):
        self.get_logger().info('I heard odom')


def main(args=None):
    rclpy.init(args=args)

    node = Listener()
    rclpy.spin(node)

    node.destroy_node()
    rclpy.shutdown()


if __name__ == '__main__':
    main()

As requested cpp publisher:

   odomPub = this->create_publisher<Odom>( "odom", rclcpp::SensorDataQoS() );
2020-10-21 08:24:04 -0500 received badge  Necromancer (source)
2020-10-20 08:54:10 -0500 received badge  Popular Question (source)
2020-10-20 08:54:10 -0500 received badge  Notable Question (source)
2020-10-19 10:06:54 -0500 received badge  Famous Question (source)
2020-10-18 03:30:13 -0500 received badge  Famous Question (source)
2020-10-09 03:16:58 -0500 edited answer Could NOT find FastRTPS (missing: FastRTPS_INCLUDE_DIR FastRTPS_LIBRARIES)

My workaround is to add this in your .bashrc: export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH This way I don't need to

2020-10-09 03:15:44 -0500 answered a question Could NOT find FastRTPS (missing: FastRTPS_INCLUDE_DIR FastRTPS_LIBRARIES)

My workaround is to add this in your .bashrc: export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH or also this: ( but Ament

2020-10-03 17:39:06 -0500 received badge  Famous Question (source)
2020-09-20 18:04:42 -0500 received badge  Famous Question (source)
2020-09-17 06:05:13 -0500 received badge  Notable Question (source)
2020-08-04 15:40:25 -0500 received badge  Popular Question (source)
2020-08-03 06:37:26 -0500 edited question Parameter events on foxy?

Parameter events on foxy? I just switched to ROS2 foxy and now my parameter events don't work anymore. I couldn't find

2020-08-03 06:36:07 -0500 commented question Parameter events on foxy?

Well, I just found out, that when adding a namespace it won't work. I suppose you don't have namespaced nodes..

2020-07-30 04:14:42 -0500 received badge  Notable Question (source)
2020-07-28 09:09:41 -0500 asked a question Parameter events on foxy?

Parameter events on foxy? I just switched to ROS2 foxy and now my parameter events don't work anymore. I couldn't find

2020-07-27 15:06:44 -0500 received badge  Popular Question (source)
2020-07-24 08:01:23 -0500 edited question Can't find library added to a ros pkg which itself is linked to another ros pkg

Can't find library added to a ros pkg which itself is linked to another ros pkg I have a ros library called common which

2020-07-24 07:59:58 -0500 asked a question Can't find library added to a ros pkg which itself is linked to another ros pkg

Can't find library added to a ros pkg which itself is linked to another ros pkg I have a ros library called common which

2020-07-24 01:19:26 -0500 received badge  Popular Question (source)
2020-07-22 15:12:49 -0500 asked a question rviz over ssh

rviz over ssh We have a host with ubuntu 18.04 and ROS2 eloquent installed. Then we have 2 clients, one with native ubu

2020-07-11 09:58:49 -0500 received badge  Notable Question (source)
2020-07-11 09:58:49 -0500 received badge  Famous Question (source)
2020-05-21 15:56:04 -0500 answered a question Unable to load ROS2 workspace into CLion

Well, you can open your whole workspace and then just go to the projects CMakeLists file and right click load the projec

2020-05-21 03:19:07 -0500 received badge  Notable Question (source)
2020-05-13 03:41:43 -0500 received badge  Famous Question (source)
2020-05-06 11:14:04 -0500 received badge  Famous Question (source)
2020-05-03 22:16:57 -0500 received badge  Famous Question (source)
2020-04-21 22:03:42 -0500 received badge  Notable Question (source)
2020-04-21 17:33:13 -0500 received badge  Famous Question (source)