How to add a new nodelet to a ROS nodelet manager located in a different package - ros

I'm new to ROS (and CMake, especially) and I've been searching for answers to this question for awhile.
First, I'm using ROS1 Noetic on Ubuntu 20.04 LTS
I am using a LiDAR sensor on my project, and I am using a ROS driver package provided by the manufacturer. Their package is written using nodelets: one nodelet acts as the driver/publisher and a second nodelet acts as a subscriber that assembles ROS bags. I've written a nodelet source file of my own that does some processing on the data published by the LiDAR driver, and I'd like to patch this nodelet into the driver's nodelet manager. I'd like to put this nodelet (and the others I'll be writing) in their own package, while keeping the manufacturer-provided code in its own, separate package.
I made my package and linked the manufacturer's package as a dependency, wrote my nodelet source file in the same namespace as the manufacturer's nodelets (#include'ing the library from the manufacturer's ROS package), made my nodelets.xml file, edited my package.xml to export the nodelets.xml file, tried to write an appropriate CMakeLists.txt file, and then created a .launch file to launch the manufacturer's manager/nodelets followed by my own nodelet.
When I run catkin_make, everything builds without throwing any errors, but when I try to run everything I get the following messages in the terminal:
process[rosout-1]: started with pid [14738]
started core service [/rosout]
process[cepton_manager-2]: started with pid [14745]
process[cepton_driver-3]: started with pid [14747]
process[cepton_subscriber-4]: started with pid [14748]
process[cepton_pruner-5]: started with pid [14750]
[ INFO] [1648137638.259213475]: Loading nodelet /cepton_driver of type cepton_ros/DriverNodelet to manager cepton_manager with the following remappings:
[ INFO] [1648137638.262238546]: waitForService: Service [/cepton_manager/load_nodelet] has not been advertised, waiting...
process[cepton_rviz-6]: started with pid [14755]
[ INFO] [1648137638.289473532]: Loading nodelet /cepton_subscriber of type cepton_ros/SubscriberNodelet to manager cepton_manager with the following remappings:
[ INFO] [1648137638.293830600]: Initializing nodelet with 4 worker threads.
[ INFO] [1648137638.295997429]: waitForService: Service [/cepton_manager/load_nodelet] has not been advertised, waiting...
[ INFO] [1648137638.297265577]: Loading nodelet /cepton_pruner of type vt_cepton/PrunerNodelet to manager cepton_manager with the following remappings:
[ INFO] [1648137638.304628562]: waitForService: Service [/cepton_manager/load_nodelet] is now available.
[ INFO] [1648137638.318009289]: waitForService: Service [/cepton_manager/load_nodelet] is now available.
[ERROR] [1648137638.323951769]: Failed to load nodelet [/cepton_pruner] of type [vt_cepton/PrunerNodelet] even after refreshing the cache: Failed to load library /home/autodrive/catkin_ws/devel/lib//libvt_cepton.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/autodrive/catkin_ws/devel/lib//libvt_cepton.so: undefined symbol: _ZN3pcl7PCLBaseIN10cepton_sdk4util11SensorPointEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS3_EEEE)
[ERROR] [1648137638.324030872]: The error before refreshing the cache was: Failed to load library /home/autodrive/catkin_ws/devel/lib//libvt_cepton.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /home/autodrive/catkin_ws/devel/lib//libvt_cepton.so: undefined symbol: _ZN3pcl7PCLBaseIN10cepton_sdk4util11SensorPointEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS3_EEEE)
[FATAL] [1648137638.324638370]: Failed to load nodelet '/cepton_prunerof typevt_cepton/PrunerNodeletto managercepton_manager'
[ INFO] [1648137638.333213726]: [/cepton_driver] cepton_sdk 1.18.2
[cepton_pruner-5] process has died [pid 14750, exit code 255, cmd /opt/ros/noetic/lib/nodelet/nodelet load vt_cepton/PrunerNodelet cepton_manager __name:=cepton_pruner
As you can see, the manufacturer's manager and driver load as expected, but I have trouble attaching my nodelet to the manufacturer's manager.

Related

s2i haskell stack failed to build cardano-sl

Im trying to build my cardano full node application
I am having some issue with the stack.yaml, I am using current stack-2.1.1 and I installed all the dependencies for cardano-sl:
https://github.com/input-output-hk/cardano-sl/blob/develop/docs/how-to/build-cardano-sl-and-daedalus-from-source-code.md
---> Building application from source...
Going to build: cardano-sl-networking cardano-sl-binary cardano-sl-util cardano-sl-crypto cardano-sl-core cardano-sl-db cardano-sl-chain cardano-sl-infra cardano-sl cardano-sl-node cardano-sl-client cardano-sl-generator cardano-sl-auxx cardano-sl-tools cardano-sl-explorer cardano-sl-wallet
Building cardano-sl-networking
stack build --ghc-options=" -Wwarn" --test --no-haddock-deps --bench --jobs=1 --no-run-tests --no-run-benchmarks --dependencies-only cardano-sl-networking
Could not parse '/opt/app-root/src/stack.yaml':
Aeson exception:
Error in $.packages[32]: failed to parse field 'packages': expected Text, encountered Object
See http://docs.haskellstack.org/en/stable/yaml_configuration/
Build failed
ERROR: An error occurred: non-zero (13) exit code from mycardano-s2i
My stack.yaml:
resolver: lts-12.17
flags:
ether:
disable-tup-instances: true
extra-package-dbs: []
packages:
util
util/test
networking
binary
binary/test
crypto
crypto/test
core
core/test
db
db/test
infra
infra/test
chain
chain/test
lib
generator
client
auxx
script-runner
explorer
node
tools
tools/post-mortem
utxo
wallet
node-ipc
faucet
acid-state-exts
x509
cluster
mnemonic
I have read some workaround where you have to update stack, but I am the moment I am using the last release 2.1.1.

error while reading extension file 'intellij_info_bundled.bzl'

we are trying to create a Scala project which uses Spark also but we are facing issue Encountered error while reading extension file 'intellij_info_bundled.bzl': no such package '#intellij_aspect//': No WORKSPACE file found in C:/users//_bazel_user/i45wuf6d/external/intellij_aspect. Is it has something missing in Intellij?
Scala file
package src.main.scala
object HelloWorld extends App {
def main(args: Array[String]) {
println("Hello, world!")
}
}
Build file
package(default_visibility = ["//visibility:public"])
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_test")
scala_library(
name = "hello-world",
srcs = glob(["src/main/scala/*.scala"]),
)
scala_test(
name = "Hello_test",
srcs = glob(["src/main/scala/*.scala"]),
size = "small", # Expect this test to run quickly
)
Work Space
workspace(name = "scala_example")
rules_scala_version="7522c866450cf7810eda443e91ff44d2a2286ba1" # update this as needed
http_archive(
name = "io_bazel_rules_scala",
url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip"%rules_scala_version,
type = "zip",
strip_prefix= "rules_scala-%s" % rules_scala_version
)
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories()`enter code here`
# register default scala toolchain
load("#io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
scala_register_toolchains()
Command and Error from console
Command: C:\ProgramData\chocolatey\bin\bazel.exe build --tool_tag=ijwb:IDEA:community --keep_going --curses=no --color=yes --experimental_ui=no --progress_in_terminal_title=no --aspects=#intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect --override_repository=intellij_aspect=C:\Users\ADMIN.IdeaIC2017.3\config\plugins\ijwb\aspect --output_groups=intellij-compile-java,intellij-compile-py -- //...:all
INFO: Loading complete. Analyzing...
ERROR: Encountered error while reading extension file 'intellij_info_bundled.bzl': no such package '#intellij_aspect//': No WORKSPACE file found in C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/external/intellij_aspect.
INFO: Found 3 targets...
WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-out -> C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/execroot/scala_example/bazel-out: Cannot create junction (name=C:\users\admin\scalaprojects\example1\bazel-out, target=C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file-jni.cc(86): nativeCreateJunction(C:\users\admin\scalaprojects\example1\bazel-out, C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file.cc(128): CreateJunction(\?\C:\users\admin\scalaprojects\example1\bazel-out): Cannot create a file when that file already exists.
cannot create symbolic link bazel-out -> C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/execroot/scala_example/bazel-out: Cannot create junction (name=C:\users\admin\scalaprojects\example1\bazel-out, target=C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file-jni.cc(86): nativeCreateJunction(C:\users\admin\scalaprojects\example1\bazel-out, C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file.cc(128): CreateJunction(\?\C:\users\admin\scalaprojects\example1\bazel-out): Cannot create a file when that file already exists.
.
INFO: Building...
ERROR: command succeeded, but not all targets were analyzed.
INFO: Elapsed time: 18.108s, Critical Path: 0.05s
Make failed
This is a sample Helloworld program only
In general, like #Ittai, I would suggest you open an issue in the intellij plugin github repo.
Unfortunately, your version of the plugin is no longer supported. I, too, previously ran into an issue with an older version of the plugin and was recommended to upgrade to the latest version. Which resolved the specific issue I was facing.
When reporting the issue make sure to include the following bits of information:
intellij build number
plugin version number
rules_scala version
operating system (it seems your using Windows, while most users use unix based systems)
bazel release number
how you have opened the intellij project (BUILD file, WORKSPACE, .blazeproject)
Additionally, to verify this is in fact an issue with the plugin, I would also suggest you try to reproduce this issue on a Unix based system. It seems you are using Intellij
compile on Windows. This may be Windows specific issue with aspects not being recognized.
When attempting to reproduce, make sure to clone your repository in a separate directory, close the intellij project, and reopen the project

Error while installing Nitrogen

Thought I'd explore Nitrogen. Following install instructions outlined in http://nitrogenproject.com/doc/tutorial.html, I pulled source from GitHub, executed second step, make rel_inets, and hit a wall. Here is what the system told me:
nitrogen$ make rel_inets
...
make[2]: Leaving directory `/home/lloyd/Erl/nitrogen'
Running Erlang
Generating "reltool.config" with merged overlays
...Loading base file: "reltool_base.config"
...Merging Overlay from "reltool_inets.config"
...Writing "reltool.config"
...SUCCESS
make[2]: Entering directory `/home/lloyd/Erl/nitrogen'
Running Erlang
==> rel (generate)
ERROR: generate failed while processing /home/lloyd/Erl/nitrogen/rel: {'EXIT', {{badmatch,{error,"Illegal library \"/home/lloyd/Programming/Erlang/zippity/apps\": no such file or directory"}},
Turns out that /home/lloyd/Programming/Erlang/zippity/apps was deleted long ago; e.g. it's not in my directory tree.
Can any kind wizards tell me why in the world would make dredge up this ancient history? And... what can I do about it?
Many thanks,
LRP
As requested, I've edited line 231 of Makefile. Here's output of make rel_inets:
lloyd#Reliance:~/Erl/nitrogen$ make rel_inets
make[1]: Entering directory `/home/lloyd/Erl/nitrogen'
./rebar get-deps
Running Erlang
==> rel (get-deps)
==> nitrogen (get-deps)
./rebar compile
Running Erlang
==> rel (compile)
==> nitrogen (compile)
make[2]: Entering directory `/home/lloyd/Erl/nitrogen'
make[2]: Leaving directory `/home/lloyd/Erl/nitrogen'
Running Erlang
Generating "reltool.config" with merged overlays
...Loading base file: "reltool_base.config"
...Merging Overlay from "reltool_inets.config"
...Writing "reltool.config"
...SUCCESS
make[2]: Entering directory `/home/lloyd/Erl/nitrogen'
Running Erlang
DEBUG: Consult config file "/home/lloyd/Erl/nitrogen/rel/rebar.config"
DEBUG: Rebar location: "/home/lloyd/Erl/nitrogen/rel/rebar"
DEBUG: is_rel_dir(/home/lloyd/Erl/nitrogen/rel) -> {true,
"/home/lloyd/Erl/nitrogen/rel/reltool.config"}
DEBUG: Available deps: []
DEBUG: Missing deps : []
DEBUG: Predirs: []
==> rel (generate)
DEBUG: Consult config file "/home/lloyd/Erl/nitrogen/rel/reltool.config"
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: "2.2.2"
DEBUG: vcs_vsn: Unknown VCS atom in vsn field: []
ERROR: generate failed while processing /home/lloyd/Erl/nitrogen/rel: {'EXIT',{{badmatch,{error,"Illegal library \"/home/lloyd/Programming/Erlang/zippity/apps\": no such file or directory"}},
[{rebar_reltool,generate,2,[]},
{rebar_core,run_modules,4,[]},
{rebar_core,execute,5,[]},
{rebar_core,process_dir1,6,[]},
{rebar_core,process_commands,2,[]},
{rebar,main,1,[]},
{escript,run,2,[{file,"escript.erl"},{line,747}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]}]}}
make[2]: *** [generate] Error 1
make[2]: Leaving directory `/home/lloyd/Erl/nitrogen'
make[1]: *** [rel] Error 2
make[1]: Leaving directory `/home/lloyd/Erl/nitrogen'
make: *** [rel_inets] Error 2
Big thanks guys. Evidently I had set ERL_LIBS sometime back not fully understanding the implications. The ERL_LIBS value was orphaned when I deleted the library directory. So, unset ERL_LIBS did the trick. Nitrogen is now installed.
Re hosed Erlang installation: thanks to tip from Bob Ippolito, I purged Erlang from my system, installed the Erlang dependencies, then reinstalled Erlang via kerl. Rebar now compiles. n2o is still not cooperating--- stalls during compilation after many warnings. But I'll work on that today.
Thanks again,
LRP

Trigger.io error "/usr/bin/codesign no identity found" can't create package or run the app on the device

I have a problem when trying to run my application on the device or create IPA file.
I followed the steps here and I have this error when trying to run on iOS option:
[ERROR] Failed when running /usr/bin/codesign: FdawaDev: no identity found
I tried to make it throw terminal with this command
forge package ios --ios.profile.provisioning_profile Development.mobileprovision
and I'm getting this error
/Applications/TriggerToolkit.app/Contents/MacOS/forge -v package ios --ios.profile.provisioning_profile Development.mobileprovision
[ INFO] Forge tools running at version 3.3.43
[ DEBUG] Checking for update zip...
[ ERROR] Couldn't import generation code: No module named generate_dynamic
[ DEBUG] Traceback (most recent call last):
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/async.py", line 98, in run
result = self._target(*self._args, **self._kwargs)
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/main.py", line 443, in package
generate_dynamic = forge_build.import_generate_dynamic()
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/build.py", line 67, in import_generate_dynamic
raise ForgeError("Couldn't import generation code: {0}".format(e))
ForgeError: Couldn't import generation code: No module named generate_dynamic
I removed TriggerToolkit and download the latest one, installed it again and I'm still getting the same error.
What am I missing?
The first error is a configuration problem: you're pointing at an iOS developer identity called "FdawaDev" when one doesn't exist in your Keychain.
Unless you have several identities, you can safely leave the "Certificate" Local Config setting empty in the Toolkit.
If you have several identities, you should specify one with something like iPhone Developer: James Brady.
For the second problem, when using the command line tools, you have to manually run a build before doing a run or package action, e.g.:
% forge build ios && forge package ios

Trigger.io [Errno 18] Cross-device link

When I try to run package ios on mac, I get the following:
[INFO] Forge tools running at version 3.3.5
[INFO] Update result: you already have the latest tools
[INFO] Configuration is unchanged: using existing templates
[INFO] Checking JavaScript files...
[INFO] JavaScript check complete
[INFO] Verifying your configuration settings...
[INFO] Configuration settings check complete
[INFO] Development build created. Use forge run to run your app.
[INFO] Forge tools running at version 3.3.5
[INFO] Checking JavaScript files...
[INFO] JavaScript check complete
[INFO] Verifying your configuration settings...
[INFO] Configuration settings check complete
[INFO] Starting package process for iOS
[INFO] Going to package: /Users/******************/device-ios.app
[INFO] Plist OK
[INFO] 1 Provisioned Device(s):
[INFO] ['c**************************b']
[ERROR] [Errno 18] Cross-device link
The settings are all filled up correctly on App config, local config, etc.
Here is debug output
........
in run
self._run_task(func_name, args, kw)
File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/build.py", line 293, in _run_task
self.tasks[func_name](self, *args, **kw)
File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 568, in package_ios
certificate_password=certificate_password,
File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 362, in create_ipa_from_app
self._create_entitlements_file(build, plist_dict, temp_file_path)
File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 299, in _create_entitlements_file
_replace_in_file(temp_file_path, 'APP_ID', bundle_id)
File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 294, in _replace_in_file
os.rename(tmp_file, filename)
OSError: [Errno 18] Cross-device link
Go to /Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py line 294,
change this line:
os.rename(tmp_file, filename)
to this one:
shutil.move(tmp_file, filename)
Package again.
source
Are you using an external hard-drive? If so, it looks like we've been bitten by a limitation of Python here (http://docs.python.org/library/os.html#os.rename):
The operation may fail on some Unix flavors if src and dst are on different filesystems
In the short term, can you run your forge commands not on your external hard drive? We'll work on a fix for the underlying problem and report back here.
I encountered the same issue compiling iOS packages on Ubuntu. I have an encrypted home directory, which is likely the cause of the cross-filesystem issue.
Luckily I was able to work out an easy fix thanks to #Amir's great response.
From http://docs.python.org/dev/library/tempfile.html#tempfile.mkstemp
If dir is specified, the file will be created in that directory; otherwise, a default directory is used. The default directory is chosen from a platform-dependent list, but the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables.
I simply moved the temp directory by starting Trigger with the following commands:
export TMPDIR="/home/me/tmp"
python /home/me/source/TriggerToolkit/run_trigger_toolkit.py
This is fixed in the v1.4.34 Trigger.io platform version - see http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-34

Resources