Giter Club home page Giter Club logo

Comments (16)

mdjurfeldt avatar mdjurfeldt commented on September 14, 2024

Hi,

Most likely, this is still the problem that the binaries can't be found.

What kind of machine are you running this on?

And did you really try:

binary=/opt/MUSIC-master/ros/adapters/ros_sensor_adapter

etc?

(Note also that the statements under a [...] section should be indented---but this maybe just disappeared when you copied the file into this issue?)

from music.

mdjurfeldt avatar mdjurfeldt commented on September 14, 2024

Also, /opt/MUSIC-master/ros/adapters seems like a strange location. Are you sure that the ros_sensor_adapter binary is in that directory? Please make sure that the absolute path given to binary= actually points to a binary.

from music.

Aamanen avatar Aamanen commented on September 14, 2024

Hello
Thank you for your quick reply!

Im running on ubuntu 16.04
Yes however i try giving the path, it just returns the path as an error:

Error during launching of binary /opt/MUSIC-master/ros/adapters/ros_sensor_adapter MUSIC: No such file or directory

Could it be the environment of MUSIC that isn't linked correctly?
Yes I didn't notice that the indentation disappeared when i copied it here - the file looks like the braitenberg3.music from the toolchains github.

The path "/opt/MUSIC-master/ros/adapters" is where the files "ros_sensor_adapter.cpp", "connect.cpp" etc are located.
Where would you suspect them to be?

from music.

mdjurfeldt avatar mdjurfeldt commented on September 14, 2024

Those are the source files which are compiled into a binary. After installation, I would expect the binary to end up at, for example, /usr/local/bin---if you didn't give your own ---prefix= to configure, i.e.

So, I think the first step here is to produce and install the binary ros_sensor_adapter. Once this is done and you have pointed to it correctly, I think your problem will then be gone.

from music.

weidel-p avatar weidel-p commented on September 14, 2024

@Aamanen did you install MUSIC with the flag --with-ros ? Otherwise the ros adapters are not compiled.

Anyway, may I also draw your attention to the new version of this software? Take a look at these two repositories: https://github.com/incf-music/music-adapters and https://github.com/incf-music/ros-music-adapters

from music.

Aamanen avatar Aamanen commented on September 14, 2024

@mdjurfeldt yes that really makes a lot more sense, and it also solved the problem!

@weidel-p I will look into those to repositories. Thank you!

Another question in the same topic:
the ros_command_adapter only takes either a Twist message or a MultiArray, but I want to publish 2 torques to two jointcontrollers.
Do you know if there is way to do this?

from music.

Aamanen avatar Aamanen commented on September 14, 2024

I also have another challenge with running the simulation:
(sorry for the extreme formatting of the code :( )

martin@martin-X75VD:~/catkin_ws/src/ros_music_adapter-master/examples/braitenberg3$ mpirun -np 6 music fable.music
initializing rate encoder
initializing connect adapter
initializing ROS sensor adapter
initializing linear readout decoder
initializing ROS command adapter
[INFO] [2017.10.18 8:48:50 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2017.10.18 8:48:50 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:221 @ Network::create_rngs_] : Deleting existing random number generators
[INFO] [2017.10.18 8:48:50 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2017.10.18 8:48:50 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:272 @ Network::create_grng_] : Creating new default global RNG
[martin-X75VD:20332] *** Process received signal ***
[martin-X75VD:20332] Signal: Segmentation fault (11)
[martin-X75VD:20332] Signal code: Address not mapped (1)
[martin-X75VD:20332] Failing at address: 0xe9
[martin-X75VD:20332] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fbc4b976390]
[martin-X75VD:20332] [ 1] /usr/local/lib/libmusic.so.1(_ZN5MUSIC7Runtime8finalizeEv+0x13)[0x7fbc4b6c79a3]
[martin-X75VD:20332] [ 2] music(_ZN16RosSensorAdapter8finalizeEv+0xd)[0x412e9d]
[martin-X75VD:20332] [ 3] music(_ZN16RosSensorAdapter9initMUSICEiPPc+0x5b6)[0x414546]
[martin-X75VD:20332] [ 4] music(_ZN16RosSensorAdapter4initEiPPc+0xb9)[0x4146b9]
[martin-X75VD:20332] [ 5] music(main+0x89)[0x4122c9]
[martin-X75VD:20332] [ 6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fbc4a838830]
[martin-X75VD:20332] [ 7] music(_start+0x29)[0x4123f9]
[martin-X75VD:20332] *** End of error message ***
ERROR: msg type unknown

mpirun noticed that process rank 0 with PID 20332 on node martin-X75VD exited on signal 11 (Segmentation fault).

from music.

weidel-p avatar weidel-p commented on September 14, 2024

@Aamanen regarding your first question of publishing two torques. There are multiple solutions to that. You could try to use two separate RosCommandAdapter, one for each torque. You could also publish both torques in one MultiArray and use a ROS script to separate them afterwards. Or you might want to extend the RosCommandAdapter by a message type that fits your needs.

To your SegementationFault issue, is this error occurring during or after the simulation? At this point I want to mention again that it might be worth the effort to switch to the new version of this software..

from music.

Aamanen avatar Aamanen commented on September 14, 2024

@weidel-p I was also considering duplicating the RosCommanAdapter, but I think the MultiArray and a ROS script to handle it would be more handy.

The segmentation fault happens after roslaunch of my robot (which is running fine), when I call the MPI
mpirun -np 6 music fable.music
And fable.music is more or less the file which i copied in, when i opened this issue

from music.

Aamanen avatar Aamanen commented on September 14, 2024

I will take your advice and spent the time to upgrade to the newest version!

from music.

Aamanen avatar Aamanen commented on September 14, 2024

After installing the two new adapter repositories I still have some troubles.
My music configuration file, which i changed to use the new repos looks like this
fablenew.txt
(here in .txt format)
But i still receive this

martin@martin-X75VD:~/catkin_ws/src/ros-music-adapters/examples/braitenberg3/scripts$ mpirun -np 6 music fablenew.music 
ROSContAdapter init 
ContContAdapter init 
RateEncoderAdapter init 
[INFO] [2017.10.18 14:19:28 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2017.10.18 14:19:28 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:221 @ Network::create_rngs_] : Deleting existing random number generators
[INFO] [2017.10.18 14:19:28 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2017.10.18 14:19:28 /opt/nest-2.12.0/nestkernel/rng_manager.cpp:272 @ Network::create_grng_] : Creating new default global RNG
LinearDecoderAdapter init 
ContROSAdapter init 
[martin-X75VD:15779] *** Process received signal ***
[martin-X75VD:15779] Signal: Segmentation fault (11)
[martin-X75VD:15779] Signal code:  (128)
[martin-X75VD:15779] Failing at address: (nil)
[martin-X75VD:15779] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7fadf63954b0]
[martin-X75VD:15779] [ 1] /usr/local/lib/libmusic.so.1(_ZN5MUSIC7Runtime8finalizeEv+0x13)[0x7fadf74409a3]
[martin-X75VD:15779] [ 2] /opt/MUSICADAPTER/lib/libmusicadapter.so(_ZN7Adapter8finalizeEv+0xd)[0x7fadf792b0bd]
[martin-X75VD:15779] [ 3] music(_ZN14ROSContAdapter4initEiPPc+0x9ee)[0x414b3e]
[martin-X75VD:15779] [ 4] music(main+0x2b)[0x413abb]
[martin-X75VD:15779] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fadf6380830]
[martin-X75VD:15779] [ 6] music(_start+0x29)[0x413b49]
[martin-X75VD:15779] *** End of error message ***
ERROR: msg type unknown
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 15779 on node martin-X75VD exited on signal 11 (Segmentation fault).

I can't really figure out what the messages means besides from the last "ERROR: msg type unknown" which is the Float64MultiArray type i try to write the commands to. Still I don't see how it doesn't take Float64MultiArray as a correct msg type, as MultiArray and Twist is the only ones implemented in the "cont_ros_adapter" from the repository

from music.

mdjurfeldt avatar mdjurfeldt commented on September 14, 2024

from music.

Aamanen avatar Aamanen commented on September 14, 2024

@mdjurfeldt okay thank you!
I will try solving it in the meantime, and hopefully I will have it solved before next week :)

from music.

weidel-p avatar weidel-p commented on September 14, 2024

@Aamanen there was a mistake in the naming of the message types. The ros_cont_adapter expected you to call the Float64MultiArray just FloatArray. This is of course not consistent with the ROS message types, so I changed it. Please pull the newest update and reinstall, then this error shouldn't occur anymore.

Thanks for the bug report!

from music.

Aamanen avatar Aamanen commented on September 14, 2024

Wow I've been staring blindly at that line of code so many times and not noticing that...
Thank you so much @weidel-p !
Simulation runs smoothly now

from music.

mdjurfeldt avatar mdjurfeldt commented on September 14, 2024

Good to hear!

Closing this issue.

from music.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.